Abstract: A package structure with an optical barrier is provided. An emitter for emitting an optical signal and a detector for receiving the optical signal are disposed on a substrate. The optical barrier is disposed between the emitter and the detector for shielding the excess optical signal. A package material is used to completely cover the optical barrier, the emitter and the detector so that the optical barrier is completely disposed within the package material.