A novel soft–hard template approach for preparing photoluminescent carbon dots (CDs) with tunable sizes, compositions, crystalline degrees and photoluminescence properties has been developed using four different precursors as carbon sources. The results offer a new strategy for fabrication of monodispersed CDs with well-defined morphology.