In the present work, we studied the magnetic and structural properties of Co ultrathin films grown by electrodeposition onto Au substrates. The influence of the solution pH is particularly investigated using in situ and ex situ magnetization measurements. The results indicated that the magnetization is out of plane for both basic and acid solutions. Deposits performed at pH 8.5 keep their perpendicular component up to thickness of 20 monolayers (ML) either in or out of the solution, whereas the magnetization becomes in plane for a much lower thickness for deposits performed at pH 3.5 (above 2ML in solution and 6−7ML after capping with Cu).