A pH sensor is described based on a reversible, mass-changing pH-responsive hydrogel. While the hydrogel can be used with any mass based sensor, in this work it is coupled with a magnetoelastic sensor the resonance frequency of which corresponds with applied mass load. The poly(acrylic acid-co-isooctyl acrylate) hydrogel, with an acrylic acid (80%) and N,N-methylenebis(acrylamide) cross linker, was synthesized by free radical polymerization. Excellent adhesion between the ribbon-like magnetoelastic sensor and the pH responsive hydrogel is achieved by pre-coating the sensor with a layer of polyurethane, and adding 1-(3-dimethylaminopropyl)-3-ethylcarbodiimide (EDC) into the hydrogel solution. The pH sensor response is accurately fit using the equation fr=49.891−1.04 pH + 0.048 pH2. The average change in sensor resonance frequency is 506 Hz/pH, approximately 1%/pH of the resonance frequency value, from pH 4.4 to 8.5. Measurement resolution between pH 4.4 and 8.5 is 0.02 pH units, corresponding to a resonance frequency measurement error (standard deviation) of 2.9 Hz.