The regulation of pH is closely associated with biological activities within organisms. Such an acidic feature is crucial in the development of tumors and the immune microenvironment in tumors. However, the pH distribution in tumors is highly heterogeneous spatiotemporally. There is a lack of systematic and quantitative detection of the pH distribution in tumors. Herein, we developed a tetrazine-based ratiometric pH sensor, TzR-H, that can label whole cells or certain organelles through a bio-orthogonal reaction and quantify pH distribution in situ. This pH sensor was fabricated by bridging a BODIPY donor and a pH-sensitive rhodamine acceptor with a tetrazine linker. It anchored live cells via glycometabolism and bio-orthogonal labeling, providing high labeling stability and signal-to-noise ratio. It possessed a pKa of 6.92 and a high detecting precision of 0.02 pH units in the pH range of 5.0-9.0. By utilizing TzR-H, we tracked and visualized the glycolysis-associated pH fluctuations in tumor cells and spheres. Specifically, we quantified the pH gradient throughout the tumorspheres post various glycolysis states, e.g., the average pH values of the tumorsphere were measured to be 7.74 ± 0.07, 7.48 ± 0.09, and 5.69 ± 0.06 at 12, 24, and 48 h post glycolysis, respectively; and the pH values were measured to be 5.72 ± 0.05, 6.47 ± 0.06, and 7.04 ± 0.08 from the internal to the surface layer of tumorspheres, respectively. This tetrazine-based structural feature and bio-orthogonal labeling strategy enabled spatial and temporal quantitation of pH within tumorspheres, providing a universal approach for quantifying disease-related factors.