A metal-semiconductor-metal (MSM) photodetector is fabricated on a thin polysilicon membrane embedded in a silicon-based wafer-level package for light-emitting diodes (LEDs) to accurately sense the brightness of a mounted LED. A thin polysilicon membrane, which is slightly askew above the LED chip, was made reproducibly and uniformly on a silicon substrate. In the membrane, an MSM photodetector having interdigitated fingers with 3 mu m width and 3 mu m space was fabricated. This device can receive light directly from the LED, and thereby shows a higher and more accurate photo-response, about 280 times higher than that of a conventional structure, to the LED mounted in the silicon-based wafer package.