A method of compensating for a DC offset of a high-voltage AC output from a Modular Multilevel Converter, MMC, comprising at least one phase leg of at least one AC phase, wherein each of the at least one phase legs comprises a plurality of cascaded converter cells, each cell comprising a plurality of semiconductor switches and an energy storage forming an intermediate DC circuit in the cell, wherein each phase leg of the MMC is connected between a three-phase high-voltage AC grid via a first grid transformer and a second high-voltage AC grid via a second grid transformer and/or via a line reactor and wherein the MMC comprises a control device and at least one DC offset correcting device comprising a controller and wherein each of the at least one phase legs is connected to one of the at least one DC offset correcting devices, the method comprising: in at least one DC offset correcting device of the MMC, measuring the DC offset by, in each of the at least one DC offset correcting devices: obtaining a high-voltage AC signal across the phase leg or legs in the MMC connected to that DC offset correcting device, removing high-voltage AC components from the obtained high-voltage AC signal by means of a passive higher-order filter to obtain an analogue filtered signal, converting the analogue filtered signal to a digital signal by means of an analogue-to-digital converter, removing remaining AC components from the digital signal by means of a digital filter, whereby the AC components are sufficiently supressed to allow obtaining of the DC offset, and in the controller, comparing the obtained offset with a reference value and forming a control signal based on said comparing; transmitting the control signal from each of the at least one DC offset correcting devices to the control device of the MMC; the control device mapping the control signal(s) from the at least one DC offset correcting device to the phase leg or legs connected to that DC offset correcting device; and based on the mapping, the control device sending switching commands to the semiconductor switches of the cells in each of the at least one phase legs to compensate for the DC offset. obtaining a high-voltage AC signal across the phase leg or legs in the MMC connected to that DC offset correcting device, removing high-voltage AC components from the obtained high-voltage AC signal by means of a passive higher-order filter to obtain an analogue filtered signal, converting the analogue filtered signal to a digital signal by means of an analogue-to-digital converter, removing remaining AC components from the digital signal by means of a digital filter, whereby the AC components are sufficiently supressed to allow obtaining of the DC offset, and in the controller, comparing the obtained offset with a reference value and forming a control signal based on said comparing; transmitting the control signal from each of the at least one DC offset correcting devices to the control device of the MMC; the control device mapping the control signal(s) from the at least one DC offset correcting device to the phase leg or legs connected to that DC offset correcting device; and based on the mapping, the control device sending switching commands to the semiconductor switches of the cells in each of the at least one phase legs to compensate for the DC offset.