Ion channels provide a means for sensitive pH measurement at membrane interfaces. Detailed knowledge of the structure and function of gramicidin channels permits the engineering of pH-sensitive derivatives. Two derivatives, gramicidin-ethylenediamine and gramicidin-histamine, are shown to exhibit pH-dependent single-channel behaviour over the pH ranges 9-11 and 6.5-8.5, respectively. Thermal isomerization of a carbamate group at the entrance of the channels leads to a pattern of steps in single-channel recordings. The size of the steps depends on the time-averaged degree of protonation of the appended group (ethylenediamine or histamine). Measurement of the size of the steps thus permits single-molecule pH sensing under symmetrical pH conditions or in the presence of a pH gradient.