Blue luminescent nitrogen-doped carbon nanodots (N-CDs) with pH-dependent properties were prepared from citric acid (CA), glutathione (GSH), and polyethylene polyamine (PEPA) using a two-step pyrolytic route. The N-CDs showed stable and strong emission bands at approximately 455 nm under 350 nm excitation. Moreover, the fluorescence of N-CDs can be gradually decreased by gradually increasing the pH value. A good linear relationship between the fluorescence intensity of N-CDs and the pH range of 3.0-9.0 was obtained. Thus, the response mechanism of N-CDs to pH was systematically investigated.N-CDs possessed -NH 2 , -COOH, and -CONHas active functional groups, which allowed the variable protonation/deprotonation of N-CDs to regulate the fluorescence emission intensities under changed pH values. Furthermore, upon combining urease-catalyzed hydrolysis of urea with increased pH values, a simple but effective fluorescence assay for urea was developed. The analytical performance for urea detection was the linear range of 0 to 10 mM with a detection limit of 0.072 mM. Additionally, the fluorescent sensor based on N-CDs was successfully applied for pH detection in synovial fluid and urea determination in serum. † Electronic supplementary information (ESI) available: Stability of N-CDs in salt solution, high-resolution XPS spectra of C1s and O1s, inuence of pH to pure CDs, cycle times of the reversible pH-response of N-CDs, tables of the comparison in the analytical performance of pH detection and urea determination. See