The development of novel carbon nanodots (CDs) with excellent optical properties and promising applications is an attractive but a challenging area. Herein, we demonstrate that the fluorescence properties of CDs can be optimized by simple modification of the molecular structure of the carbon source. Significantly, the final optimized CDs 1 exhibit a rare extremely acidic (pH 1−3) sensitivity. A distinguishable red/brown/green fluorescence color change is achieved for visual readout by simply tuning the pH to 1, 2, or 3. The distinguishable color change combined with ratiometric fluorescence changes greatly improves the naked-eye visual resolution up to 0.2 pH units, which is higher than that of commercial precision pH test strips. Furthermore, a smartphone was employed in a portable, low-cost, rapid, and precise pH measurement method, which satisfied the requirement of point-of-care testing. Inspired by the reversible color change of red/brown/green tri-fluorescence on tuning the pH to 1, 2, or 3, a simple yet efficient molecular logic circuit has been designed. Given the unique pH-dependent photoluminescence properties, these CDs have been further applied in the anti-counterfeiting and information encryption field, making the "burn after reading" encryption technology a reality.