A compensation device suitable for compensating a capacitive leakage current of a circuit of a single-phase electrical system, the circuit comprising: • a phase conductor and a neutral conductor connected, respectively, to a first conductor and to a second conductor of a single-phase electrical line, the second conductor of the single-phase electrical line being connected to earth, and • one or more loads which can be energized with alternating current from the single-phase electrical line via the phase and neutral conductors (1, 2), the phase and neutral conductors (1, 2) and the loads able to generate a capacitive leakage current (I CD) towards earth, the compensation device comprising a compensation circuit provided with a first and a second terminal (13,14) and being characterized in that the compensation circuit is: • arranged to be connected to the neutral conductor via the first terminal and to an earthing system via the second terminal, and • configured to generate a compensation current (I C) in such a way that it flows alternately from the neutral conductor to earth and vice versa through the earthing system when the first and second terminals (13, 14) are connected, respectively, to the neutral conductor and to the earthing system, the compensation current (I C) having direction which is opposite that of the capacitive leakage current (I CD) and intensity such that the sum of the compensation current (I C) and the capacitive leakage current (I CD) has a smaller value than the value of the capacitive leakage current (I CD), wherein the circuit comprises a residual current device whose input is connected to the single-phase electrical line and whose output is connected to the phase and neutral conductors (1, 2), the compensation device being connected to the circuit downstream of the residual current device with respect to the single-phase electrical line. • a phase conductor and a neutral conductor connected, respectively, to a first conductor and to a second conductor of a single-phase electrical line, the second conductor of the single-phase electrical line being connected to earth, and • one or more loads which can be energized with alternating current from the single-phase electrical line via the phase and neutral conductors (1, 2), the phase and neutral conductors (1, 2) and the loads able to generate a capacitive leakage current (I CD) towards earth, the compensation device comprising a compensation circuit provided with a first and a second terminal (13,14) and being characterized in that the compensation circuit is: • arranged to be connected to the neutral conductor via the first terminal and to an earthing system via the second terminal, and • configured to generate a compensation current (I C) in such a way that it flows alternately from the neutral conductor to earth and vice versa through the earthing system when the first and second terminals (13, 14) are connected, respectively, to the neutral conductor and to the earthing system, the compensation current (I C) having direction which is opposite that of the capacitive leakage current (I CD) and intensity such that the sum of the compensation current (I C) and the capacitive leakage current (I CD) has a smaller value than the value of the capacitive leakage current (I CD), • arranged to be connected to the neutral conductor via the first terminal and to an earthing system via the second terminal, and • configured to generate a compensation current (I C) in such a way that it flows alternately from the neutral conductor to earth and vice versa through the earthing system when the first and second terminals (13, 14) are connected, respectively, to the neutral conductor and to the earthing system, the compensation current (I C) having direction which is opposite that of the capacitive leakage current (I CD) and intensity such that the sum of the compensation current (I C) and the capacitive leakage current (I CD) has a smaller value than the value of the capacitive leakage current (I CD), wherein the circuit comprises a residual current device whose input is connected to the single-phase electrical line and whose output is connected to the phase and neutral conductors (1, 2), the compensation device being connected to the circuit downstream of the residual current device with respect to the single-phase electrical line.