Capsular polysaccharides and exopolysaccharides play critical roles in bacterial survival strategies, and they can have important medical and industrial applications. An immense variety of sugars and glycosidic linkages leads to an almost unlimited diversity of potential polysaccharide structures. This diversity is reflected in the large number of serologically and chemically distinct polysaccharides that have been identified among both gram-positive and gram-negative bacteria. Despite this diversity, however, the genetic loci and mechanisms responsible for polysaccharide biosynthesis exhibit conserved features and can be classified into a small number of groups. In Streptococcus pneumoniae, capsule synthesis occurs by one of two distinct mechanisms that involve the polymerization of either individual sugars in a processive reaction (synthase dependent) or discrete repeat units in a nonprocessive reaction (Wzy dependent). Characterization of these systems has provided novel insights that are applicable to polymers synthesized by many gram-positive and gram-negative bacteria, as well as eukaryotes. © 2011 by Annual Reviews. All rights reserved.