Thin films of highly anisotropic rare earth intermetallic compounds increasingly come into the focus of interest for application in magnetic miniature devices. We prepared hard magnetic SmCo and NdFeB films by pulsed laser deposition and investigated the influence of rare-earth content on phase formation, microstructure, and magnetic properties. The phase evolution with rare earth content, as observed by x-ray diffraction, shows a distinct difference for the two systems. For SmCo a disordered SmCo7 structure is found at low Sm content and a change in the lattice constants is observed for a Sm-rich sample. Simultaneously, the coercive field improves whereas the magnetic in-plane texture found for Sm-poor films vanishes for higher Sm content. For NdFeB the increase in Nd content leads to an additional Nd phase because of the small homogeneity range. Contrary to the bulk, coercivity is reduced, which can be attributed to a significant increase of grain size and roughness.