The heterogeneous structure that exists in virtually all hydrogels has a significant influence on the resulting strength and toughness. While the internal structure has been observed with electron microscopy, it is difficult to measure the in situ local polymer concentration in the native swollen state. In this study, a modified microelectrode technique (MET) was employed to measure the Donnan potential of a heterogeneous hydrogel with a phase-separated structure. With this method, we succeeded in observing quantitative in situ polymer concentrations ranging from 10.2 μmol/L to several hundred mmol/L. From the obtained concentration profiles, we could successfully evaluate the internal phase-separated structure with a resolution of less than 0.8 μm. Using MET, we could estimate the average activity coefficient of the hydrogel, and we found a difference in concentration between the dense and sparse phases. We demonstrate that MET is a powerful method that can locally and quantitatively measure the polyelectrolyte concentration distribution within hydrogels. Furthermore, this method can be applied to cells and organs in vivo due to their similarities with polyelectrolytes. Enabling the in situ determination of the internal structures of biomaterials could have important implications toward the characterization of damaged and diseased tissues on the local scale.