Embodiments of the present invention relate to method and device for measuring optical signal-to-noise ratio (OSNR). A method for measuring an OSNR of a signal of interest may comprise: obtaining spectrum of the signal of interest, the spectrum including power spectrum density distribution of the signal of interest in a channel bandwidth B; obtaining spectrum of a comparative signal that has the same spectrum characteristics as but different OSNR than the signal of interest, the spectrum including power spectrum density distribution of the comparative signal in the channel bandwidth B; and calculating the OSNR of the signal of interest by using the spectrum of the signal of interest and the spectrum of a comparative signal.