Spidroins, the major silk proteins making up the spider's dragline silk, originate in two distinct tissue layers (A and B) in the spider's major ampullate gland. Formation of the complex thread from spidroins occurs in the lumen of the duct connected to the gland. Using pH-sensitive microelectrode probes, we showed that the spidroins traveling through the gland and duct experience a monotonic decrease in pH from 7.2 to 6.3. In addition, circular dichroism spectroscopy of material extracted from the gland showed a structural refolding concomitant with position in the gland and post-extraction changes in pH. We demonstrate that lowering the pH in vitro causes a dramatic conformational change in the protein from the A zone, converting it irreversibly from a coil to a predominantly beta-sheet structure. Furthermore, amino acid analyses have indicated that there are at least two distinct, though similar, proteins secreted in the A and B zones suggesting a potential factor in the progressive acidification as well as a pH sensitivity of the folding of spidroins in the gland. Thus, we provide, for the first time, a quantitative map of the pH value and position correlated with molecular structural folding in the silk gland characterizing the crucial role that pH plays in spider silk formation.