The invention discloses a thin film type all-fiber current transformer with temperature compensation, and belongs to the technical field of optical current sensors. The problem that a fiber current transformer is likely to be influenced by temperature and vibration, and measurement accuracy is low is solved. According to the thin film type all-fiber current transformer, light emitted by a light source passes through a circulator, a first polarization-maintaining fiber coupler and a Y-waveguide in sequence, the Y-waveguide outputs two paths of light, one path of light passes through a welding branch, rotates by 90 degrees and enters a second polarization-maintaining fiber coupler, the other path of light passes through a compensating coil and enters the second polarization-maintaining fiber coupler, the two paths of light are coupled into one path to be input into a 1/4 wave plate by the second polarization-maintaining fiber coupler, the 1/4 wave plate outputs left rotating light and right rotating light, a Faraday effect happens in a sensor fiber, and then the left rotating light and the right rotating light return to the first polarization-maintaining fiber coupler. In the return process, the original light returned through the welding branch is input into the compensating coil, the other path of light is input into a processing module through the welding branch and the first polarization-maintaining fiber coupler, and the processing module processes the input light to obtain a current value to be measured. The thin film type all-fiber current transformer is used for measuring the current value.