A fluid warmer for tempering a medical fluid guided in a fluid line includes a first and second resistance heating element for alternating voltage and a heat exchanger thermally coupled to the two resistance heating elements and includes a holder for the fluid line. Each resistance heating element has a first and second electrical line connector, respectively, for connection of the resistance heating element to an alternating voltage source. Each electrical line connector has a respective drivable first switch. A respectively inversely phased alternating voltage or in-phase alternating voltage is applied to each resistance heating element during the tempering mode, wherein a compensation alternating voltage which is substantially inversely phased with respect to the heating alternating voltage is additionally applied to the heat exchanger using a compensation circuit. A voltage measurement device determines an electrical voltage between the heat exchanger and a neutral conductor of the alternating voltage source.