Infectious diseases are worldwide a major cause of morbidity and mortality. Fast and specific detection of pathogens such as bacteria is needed to combat these diseases. Optimal methods would be non-invasive and without extensive sample-taking/processing. Here, we developed a set of near infrared (NIR) fluorescent nanosensors and used them for remote fingerprinting of clinically important bacteria. The nanosensors are based on single-walled carbon nanotubes (SWCNTs) that fluoresce in the NIR optical tissue transparency window, which offers ultra-low background and high tissue penetration. They are chemically tailored to detect released metabolites as well as specific virulence factors (lipopolysaccharides, siderophores, DNases, proteases) and integrated into functional hydrogel arrays with 9 different sensors. These hydrogels are exposed to clinical isolates of 6 important bacteria (Staphylococcus aureus, Escherichia coli,…) and remote (≥25 cm) NIR imaging allows to identify and distinguish bacteria. Sensors are also spectrally encoded (900 nm, 1000 nm, 1250 nm) to differentiate the two major pathogens P. aeruginosa as well as S. aureus and penetrate tissue (>5 mm). This type of multiplexing with NIR fluorescent nanosensors enables remote detection and differentiation of important pathogens and the potential for smart surfaces.