A novel method for the fabrication of carbon nanodots (CDs) is introduced: extracting CDs from the well-known soft drink Coca Cola via dialysis. The obtained CDs are of good monodispersity with a narrow size distribution (average diameter of 3.0 nm), good biocompatibility, high solubility (about 180 mg ml−1) and stable fluorescence even at a high salt concentration. Furthermore, they are sensitive to the temperature change with a linear relationship between the fluorescence intensity and temperature from 5 °C–95 °C. The CDs have been applied in high stable temperature sensing. This protocol is quite simple, green, cost-effective and technologically simple, which might be used for a range of applications including sensing, catalysts, drug and gene delivery, and so on.