In the present study, a pH responsive dendritic polyglycerol nanogel (dPG-NG) is developed to measure the pH values inside the hair follicle (HF) using an ex vivo porcine ear model. The macromolecular precursors are labeled with a pH sensitive indodicarbocyanine dye (pH-IDCC) and a control dye (indocarbocyanine dye: ICC) and crosslinked via a mild and surfactant-free Thiol–Michael reaction using an inverse nanoprecipitation method. With this method, it is possible to prepare tailor-made particles in the range of 100 nm to 1 µm with a narrow polydispersity. The dPG-NGs are characterized using dynamic light scattering, nanoparticle tracking analysis, and atomic force microscopy. Systematic analysis of confocal microscope images of histological sections of the skin enables accurate determination of the pH gradient inside the HF. The results show that these novel pH-nanosensors deeply penetrate the skin via the follicular pathway and the pH of the pig hair follicles increase from 6.5 at the surface of the skin to 7.4 in deeper areas of the HF. The pH-nanosensor shows no toxicity potentials.