The polymeric mucin MUC5B provides the structural and functional framework of respiratory mucus, conferring both viscoelastic and antimicrobial properties onto this vital protective barrier. Whilst it is established that MUC5B forms disulfide-linked linear polymers, how this relates to their packaging in secretory granules, and their molecular form in mucus remain to be fully elucidated. Moreover, the role of the central heavily O-glycosylated mucin domains in MUC5B conformation is incompletely described. Here we have completed a detailed structural analysis on native MUC5B polymers purified from saliva and subsequently investigated how MUC5B conformation is affected by changes in calcium concentration and pH, factors important for mucin intragranular packaging and post-secretory expansion. The results identify that MUC5B has a beaded structure repeating along the polymer axis and suggest that these repeating motifs arise from distinct glycosylation patterns. Moreover, we demonstrate that the conformation of these highly entangled linear polymers is sensitive to calcium concentration and changes in pH. In the presence of calcium (Ca2+, 10 mM) at pH 5.0, MUC5B adopted a compact conformation which was lost either upon removal of calcium with EGTA, or by increasing the pH to 7.4. These results suggest a pathway of mucin collapse to enable intracellular packaging and mechanisms driving mucin expansion following secretion. They also point to the importance of the tight control of calcium and pH during different stages of mucin biosynthesis and secretion, and in the generation of correct mucus barrier properties.