The surface chemistry of nanomaterials, particularly the density of functional groups, governs their behavior in applications such as bioanalysis, bioimaging, and environmental impact studies. Here, we report a precise method to quantify carboxyl groups per nanoparticle by combining anisotropically collapsing agarose gels for nanoparticle immobilization with fluorescence microscopy and acid-base titration. We applied this approach to photon-upconversion nanoparticles (UCNPs) coated with poly(acrylic acid) (PAA) and fluorescence-labeled polystyrene nanoparticles (PNs), which serve as models for bioimaging and environmental pollutants, respectively. UCNPs exhibited 152 ± 14 thousand carboxyl groups per particle (∼11 groups/nm