Photon-upconverting nanoparticles (UCNPs) are lanthanide-doped nanocrystals that emit visible light under near-infrared excitation (anti-Stokes emission). This unique optical property precludes background fluorescence and light scattering from biological materials. The emission of multiple and narrow emission lines is an additional hallmark of UCNPs that opens up new avenues for optical encoding. Distinct emission signatures can be obtained if the multiple emission of UCNPs is tuned by their dopant composition or by surface modification with dyes. Tuning the intensity of only one of the multiple emission lines and using another one as a constant reference signal enables the design of ratiometric codes that are resistant to fluctuations in absolute signal intensities. Combining several UCNPs each displaying a distinct set of emission lines expands the coding capacity exponentially and lays the foundation for highly multiplexed analyte detection. This Review highlights the potential of UCNPs for labeling and encoding biomolecules, microspheres, and even whole cells.