CoPt and FePt nanostructures have been efficiently confined in carbon nanotubes (CNTs). A marked confinement effect has been evidenced, both on bimetallic nano-object shape and composition. In large diameter CNTs small Co- and Fe-rich nanoparticles are formed, while in small diameter CNTs Pt-rich nanowires are selectively produced.