In this paper, we demonstrate an effective method to compensate the temperature effect of long period fiber grating (LPFG). First it is found that the resonant wavelength of LPFG showes a right shift when the temperature increases while it has an opposite shift when the applied strain increases. On the basis of the characteristic, plexiglass is used to compensate the shift of the resonant wavelength induced by the tempera-ture change. The temperature characteristic of compensated LPFG has been performed. And the compensa-tion experimental result shows the temperature sensitivity of the resonance wavelength of LPFG is reduced from 55.71pm/°C to 3.7pm/°C. It is found that the method to compensate temperature is effective and prac-tical.