Background: Probe-based confocal laser endomicroscopy (pCLE) is a novel technique that provides in vivo microscopic imaging of the distal lung. We hypothesized that the intra-alveolar exudates characterizing Pneumocystis jirovecii pneumonia (PJP) can be identified by pCLE in vivo and help in its diagnosis. Objectives: We aimed toassess the usefulness of pCLE for the in vivo diagnosis of PJP. Methods: Thirty-two human immunodeficiency virus (HIV)-positive patients with new pulmonary infiltrates and fever were studied using pCLE. Real-time alveolar images were recorded during the bronchoscopy for off-line analysis by two independent observers. Bronchoalveolar lavage samples were also obtained and processed for microbiology and cytological evaluation, including Grocott stain for P. jirovecii. The sensitivity, specificity, positive predictive value (PPV) and negative predictive value (NPV) of pCLE for the diagnosis of PJP in these patients were calculated. Results: Fourteen patients (44%) were confirmed to have PJP by cultures/staining. pCLE was well tolerated in all patients. It identified intra-alveolar exudates in 13 of them (41%), where 11 of them (85%) had positive Grocott stain for P. jirovecci, with 93% concordance between observers. Sensitivity, specificity, PPV and NPV of pCLE for the diagnosis of PJP were 79, 89, 85 and 84%, respectively. In smokers, these figures improved to be 92, 88, 85 and 94%. Conclusions: pCLE is a quick and safe procedure for on-site diagnosis of PJP in HIV+ patients with excellent specificity and sensitivity mainly in smokers.