An optical waveform shaping device comprising: a branching filter for branching the light beam from a light source into light beams of each frequency; a condensing part for condensing a plurality of light beams branched by the branching filter; a polarizing plate for adjusting the polarization planes of the light beams having passed through the condensing part; and a spatial light modulator having a liquid crystal spatial light modulator having a plurality of liquid crystal cells for the phase modulation part and the liquid crystal spatial light modulator having a plurality of liquid crystal cells for the intensity modulation part where the light beams having passed through the polarizing plate are incident, the optical waveform shaping device, connected with a control device, further comprising a detection part and a voltage adjustment part, the detection part being for detecting the phase shift accompanied with intensity modulation by the intensity modulation part, the control device being for directly controlling the driving voltage applied to the phase modulation part as well as directly controls the driving voltage applied to the intensity modulation part, the voltage adjustment part being for outputting voltage to the phase modulation part, wherein the control device outputs control signals for instructing the voltage adjustment part based on the phase shift detected by the detection part, and the voltage adjustment part outputs predetermined voltage to the electrodes of the liquid crystal cells of the phase modulation part according to the control signals received from the control device, whereby the phase shift accompanied with intensity modulation is compensated, characterised in that the phase modulation part and the intensity modulation part being adjacent to each other across one glass substrate and having the glass substrate in common. a branching filter for branching the light beam from a light source into light beams of each frequency; a condensing part for condensing a plurality of light beams branched by the branching filter; a polarizing plate for adjusting the polarization planes of the light beams having passed through the condensing part; and a spatial light modulator having a liquid crystal spatial light modulator having a plurality of liquid crystal cells for the phase modulation part and the liquid crystal spatial light modulator having a plurality of liquid crystal cells for the intensity modulation part where the light beams having passed through the polarizing plate are incident, the optical waveform shaping device, connected with a control device, further comprising a detection part and a voltage adjustment part, the detection part being for detecting the phase shift accompanied with intensity modulation by the intensity modulation part, the control device being for directly controlling the driving voltage applied to the phase modulation part as well as directly controls the driving voltage applied to the intensity modulation part, the voltage adjustment part being for outputting voltage to the phase modulation part, wherein the control device outputs control signals for instructing the voltage adjustment part based on the phase shift detected by the detection part, and the voltage adjustment part outputs predetermined voltage to the electrodes of the liquid crystal cells of the phase modulation part according to the control signals received from the control device, whereby the phase shift accompanied with intensity modulation is compensated, characterised in that the phase modulation part and the intensity modulation part being adjacent to each other across one glass substrate and having the glass substrate in common.