The present invention is a method of processing an optical signal, including the steps of (a) inputting signal light into a first nonlinear optical medium to broaden the spectrum of the signal light through self phase modulation occurring in the first nonlinear optical medium, thereby obtaining first spectrally broadened light, (b) compensating for chromatic dispersion effected on the first spectrally broadened light obtained in the step (a), and (c) inputting the first spectrally broadened light processed by the step (b) into a second nonlinear optical medium to broaden the spectrum of the first spectrally broadened light through self phase modulation occurring in the second nonlinear optical medium, thereby obtaining second spectrally broadened light.