Co-rich CoPtP alloys have been electrodeposited using direct current (dc) and pulse-reverse (PR) plating techniques. The surface morphology, crystalline structure, grain size, and magnetic properties of the plated films have been compared. The x-ray analysis and magnetic measurements reveal the presence of Co hcp hard magnetic phase with c axis perpendicular to the substrate for dc and in plane for PR plated films. The dc plated films have a granular structure in the micron scale with large cracks, which are manifestation of stress in the film. Only by using a combination of optimized PR plating conditions and stress relieving additive, we are able to produce 1-6 mu m thick (for 1 hour of plating), stress-free, and nanostructured (similar to 20 nm) Co-rich CoPtP single hcp phase at room temperature, with an intrinsic coercivity of 1500 Oe. (c) 2007 American Institute of Physics.