A microfluidic platform with a fluorescent nanoparticle-based sensor is demonstrated for real-time, ratiometric pH imaging of biofilms. Sensing is accomplished by a thin patterned layer of covalently bonded Ag@SiO2+FiTC nanoparticles on an embedded planar glass substrate. The system is designed to be sensitive, responsive and give sufficient spatial resolution to enable new micro-scale studies of the dynamic response of oral biofilms to well-controlled chemical and hydrodynamic stimulation. Performance under challenging operational conditions is demonstrated, which include long-duration exposure to sheer stresses, photoexcitation and pH sensor biofouling. After comprehensive validation, the device was used to monitor pH changes at the attachment surface of a biofilm of the oral bacteria, Streptococcus salivarius. By controlling flow and chemical concentration conditions in the microchannel, biochemical and mass transport contributions to the Stephan curve could be probed individually. This opens the way for the analysis of separate contributions to dental caries due to localized acidification directly at the biofilm tooth interface.