The corrosion performance of two crystalline Co–Ni–Pr and Co–Ni–Er alloys (Pr5.5Co58Ni36.5 and Er6.5Co57.5Ni36) in an alkaline solution, like the one used in water electrolysis, was studied and compared with that of a commercially employed binary Co–Ni alloy (Co57Ni43) in order to assess the influence of rare earth elements on its corrosion behaviour. Light electron microscopy, scanning electron microscopy and quantitative electron probe microanalysis were used to characterize the samples prior to the electrochemical tests. The experiments were carried out in 1M KOH solution at 298K. Potentiodynamic polarization curves and potentiostatic current decay transients revealed that Co–Ni–R alloys significantly improved resistance to corrosion compared with Co–Ni alloys, in spite of their two-phase microstructure, as a direct consequence of the presence of the praseodymium and erbium rare earth metals in the anodic layer formation.