Diagnosing lung cancer in the absence of endobronchial abnormalities is challenging. Needle-based confocal laser endomicroscopy (nCLE) enables real-time microscopic imaging of cells. We assessed the feasibility and safety of using nCLE for real-time identification of lung cancer.In patients with suspected or proven lung cancer scheduled for endoscopic ultrasound (EUS), lung tumours and mediastinal lymph nodes were imaged with nCLE before fine-needle aspiration (FNA) was performed. nCLE lung cancer characteristics were identified by comparison with pathology. Multiple blinded raters validated CLE videos of lung tumours and mediastinal nodes twice.EUS-nCLE-FNA was performed in 22 patients with suspected or proven lung cancer in whom 27 lesions (six tumours, 21 mediastinal nodes) were evaluated without complications. Three nCLE lung cancer criteria (dark enlarged pleomorphic cells, dark clumps and directional streaming) were identified. The accuracy of nCLE imaging for detecting malignancy was 90% in tumours and 89% in metastatic lymph nodes. Both inter-observer agreement (mean κ=0.68, 95% CI 0.66-0.70) and intra-observer agreement (mean±sd κ=0.70±0.15) were substantial.Real-time lung cancer detection by endosonography-guided nCLE was feasible and safe. Lung cancer characteristics were accurately recognised.