The dissolution of magnesium (Mg) has been investigated with an electrochemical flow cell coupled to downstream analysis. The setup allows for polarization experiments and simultaneous determination of the amount of dissolved magnesium ions via inductively coupled plasma -mass spectroscopy (ICP-MS). Additionally, Mg dissolution was compared to hydrogen evolution measurements in the flow cell and also in standard beakers. Experiments were performed in unbuffered NaCl and in buffered solutions of various pH to determine the influence of the pH on surface film stability and Mg dissolution. In borate buffer (pH 10.5), Mg(OH) 2 was found to be more stable than in unbuffered electrolyte. In the flow cell, the negative difference effect (NDE) was absent for low anodic polarization currents in a neutral buffered solution, whilst high anodic polarization currents and unbuffered electrolytes favored its existence. In beaker experiments, strong NDE was observed in a pH 10.5 buffer, and also in pH 7 and 3 buffers, but only at higher applied currents where the buffering capacity was locally overwhelmed. These observations validate the importance of the pH in near surface regions with respect to the stability of Mg-surface films and subsequent NDE.