The present disclosure relates to a polarity detector for detecting polarity of a patch cord, that is capable of sequentially inputting an optical signal into channels of a connector of the patch cord, receiving the optical signal being output, and thereby discerning the polarity of the patch cord quickly and precisely. Particularly, the present disclosure is characterized to spectrally output the optical signal from the light source as a plurality of unit optical signals, and to selectively block or pass the spectrally output plurality of unit optical signals, by heat, and thereby effectively inputting the optical signal into each channel of the connector.