The development of synthetic materials for biorelated applications requires exquisite control of the physical and chemical environment within the materials. In biological systems, mucus represents a family of hydrogels that are responsive to the environment, in particular the pH. In this talk we will discuss pH within synthetic and biological hydrogels. We will start by properly defining the pH in the thermodynamic sense and in terms of the common use of the term. Then, we answer the question what is the pH within a hydrogel and how it relates to the conditions in which it is synthesized and stored. The physical and chemical properties of pH- responsive gels are found to depend on the coupling between acid-base equilibrium, molecular organization and physical interactions. For example, the network’s degree of protonation is not only determined by chemical composition of the bath solution but also by the ability of the polymeric structure to modify the local environment. This coupling results in swelling (or shrinking) that depends on the bath pH and salt concentration. I will describe results obtained from a recently developed molecular theory that predicts the behavior of a variety of stimuli-responsive hydrogels. Our approach explicitly accounts for all of the physicochemical interactions that determine the thermodynamic equilibrium of these intelligent soft materials, and incorporates molecular details and the conformations of the polymer network. We will discuss examples of different types of hydrogels. For example in bulk systems we predict that the gel pH can be several units smaller than the bath pH depending on the salt concentration. In thin films we will discuss the gradients of protonation state and pH that results from the inhomogeneous distribution of species within the film and how this effect has implications on the effective interactions between proteins and the film. The role of pH and ionic strength on protein adsorption and its implications to chromatography will be discussed. The theoretical predictions can be used as guidelines for the design of responsive gels in a variety of applications ranging from drug delivery systems to tissue engineering scaffolds and they provide for fundamental understanding on the non- trivial behavior of these gels. Moreover, our predictions demonstrate that the chemical state within soft materials may be dramatically different from that of the environment solutions in contact with them. We find than in systems where molecular organization, chemical equilibrium and physical interactions are coupled the behavior of the system is very different from the sum of the parts that form it.