An implantable sensor developed to measure synovial fluid pH for noninvasive early detection and monitoring of hip infections using standard‐of‐care plain radiography is described. The sensor is made of a pH responsive polyacrylic acid‐based hydrogel, which expands at high pH and contracts at low pH. A radiodense tantalum bead and a tungsten wire are embedded in the two ends of the hydrogel to monitor the change in length of the hydrogel sensor in response to pH via plain radiography. The effective acid dissociation constant (pKa) of the hydrogel‐based pH sensor is 5.6 with a sensitivity of 3 mm/pH unit between pH 4 and 8. The sensor shows a linear response and reversibility in the physiologically relevant pH range of pH 6.5 and 7.5 in both buffer and bovine synovial fluid solutions with a 30‐minute time constant. The sensor is attached to an explanted prosthetic hip, and the pH response is determined from the X‐ray images by measuring the length between the tantalum bead and the radiopaque wire. Therefore, the developed sensor will enable noninvasive detection and studying of implant hip infection using plain radiography.