AbstractIn this work, the porosity of plasma electrolytic oxidation (PEO)-based coatings on Al- and Mg-based substrates was studied by two imaging techniques—namely, SEM and computer microtomography. Two approaches for porosity determination were chosen; relatively simple and fast SEM surface and cross-sectional imaging was compared with X-ray micro computed tomography (microCT) rendering. Differences between 2D and 3D porosity were demonstrated and explained. A more compact PEO coating was found on the Al substrate, with a lower porosity compared to Mg substrates under the same processing parameters. Furthermore, huge pore clusters were detected with microCT. Overall, 2D surface porosity calculations did not show sufficient accuracy for them to become the recommended method for the exact evaluation of the porosity of PEO coatings; microCT is a more appropriate method for porosity evaluation compared to SEM imaging. Moreover, the advantage of 3D microCT images clearly lies in the detection of closed and open porosity, which are important for coating properties.