The invention is an encoding strategy that is compatible with high-throughput particle synthesis and portable CCD-based decoding. Unique particle barcodes are generated by micropatterning spectrally distinct upconversion nanocrystals (UCNs). A versatile, high-performance stop-flow lithography (SFL) technique is used for synthesizing chemically anisotropic particles. The particles can be made from a vast range of polymeric or ceramic materials in any shape and size. The material properties can thus be tuned to fit the needs of the intended use of the method, such as biocompatibility, temperature resistance, scratch resistance or superior adhesion in the presence of diverse solvents.