CD-based ratiometric fluorescence probes are of great significance for visual detection, but accomplishing this goal is still a particularly challenging task. Herein, nitrogen-doped carbon dots (NCDs) with bright yellow fluorescence were easily manufactured via a one-pot hydrothermal method for visual detection of hypochlorite (ClO-) and thiosulfate (S2O32-) under UV light irradiation. The as-prepared NCDs demonstrate favorable water solubility, excellent biocompatibility, superior optical properties and low cytotoxicity. Strikingly, the fluorescence of the NCDs could be quenched with ClO-. Based on these results, an original fluorescent nanoprobe was constructed for the highly discriminating recognition of ClO- by oxidation of the amino groups on their surface to nitro groups. The assay covered the ranges from 0.067 to 19.33 μM and 24 to 98 μM with a limit of detection (S/N = 3) of as low as 0.013 μM. Remarkably, a growing peak appears at 537 nm and the emission at 492 nm shrinks with the introduction of S2O32-, which demonstrates ratiometric fluorescence emission characteristics (F537nm/F492nm) in the range of 6.6-100 μM with a limit of detection (S/N = 3) of as low as 0.78 μM. In addition, the fluorescence color of the NCDs also changes (yellow-green-blue) after adding various ClO- concentrations. The fluorescence color of the NCDs-ClO- also changes (blue-green-yellow) after adding various S2O32- concentrations. This excellent ratiometric fluorescence probe was successfully further used for nuclear imaging. Accordingly, an easy-to-prepare paper-based sensor to identify ClO- and S2O32- was fabricated, which demonstrated their adaptability for in situ on-site testing. This research further opens up new opportunities for the development of efficient yellow fluorescent probes based on NCDs nanomaterials for visual detection, biomarking, and biomedical optical imaging.