We synthesized three types of magnetic nanowires (Co-Ni-P, Co-Pt-P, and Co-Fe-P) by electrochemical deposition in polycarbonate membranes for use in magnetic barcodes. The nanowires were about 50 nm in diameter and 6 μm in length. The Co-Pt-P nanowires had the highest coercivity and remanence. We used finite elements to calculate the spatial distribution of the stray magnetic fields produced by the barcodes. The Co-Pt-P had the greatest spatial variation which makes it the best composition for the hard magnetic segment of barcode nanowires. These barcode nanowires may be used for magnetic multiplexing detection.