Bacteroides fragilis synthesizes eight distinct capsular polysaccharides, more than any described bacterium outside the order Bacteroidales. Here, we show that this organism also produces a high-molecular-weight extracellular polysaccharide (EPS). Expression of the EPS results in the formation of a large polysaccharide layer around the bacteria which prevents them from forming a tight pellet upon centrifugation and from entering a Percoll density gradient. Like expression of the capsular polysaccharides, expression of the EPS is phase variable and dictated by DNA inversion of its promoter. EPS expression is regulated at one level by the DNA invertase Tsr19, which is encoded by a gene immediately upstream of the EPS locus and inverts the EPS promoter, causing an on or off phenotype. Expression of the EPS is also regulated at another level, which dictates the amount of EPS produced. By analyzing a panel of tsr19 deletion mutants, we found that the number of inverted repeats (IRs) flanking the promoter is variable. Transcription into the EPS genes is greater in mutants with a single IR between the promoter and the downstream EPS genes than in mutants with more than one IR in this region, correlating with the synthesis of more EPS. By analyzing the relative orientations of the EPS promoter of bacteria obtained from human fecal samples, we showed that both DNA inversion and variation in the number of IRs are active processes of B. fragilis in the endogenous human intestinal ecosystem.