Many bacteria have a so-called capsule, which usually consists of polysaccharides and sometimes also of other substanances. The capsule is a structure outside the bacterial cell envelope and it can also be defined as the outer cell envelope of the bacterium. The capsule is a well-defined layer that can constitute a virulence factor for both gram-positive and gram-negative bacteria. If the amorphous and viscous secretion, which constitutes the capsule, diffuses into the surroundings and remains as loosely undefined layer without a clear outer boundary, one use instead to speak of a slime layer. In summary, capsules and slime layers are usually called glycocalyx. A biofilm is formed when many bacteria are enclosed in a common slime layer.
The polysaccharide capsule of a bacterium can consist of many different linear polysaccharides. These polysaccharides are made up of repeating subunits, which consist of one to six monosaccharides. The diversity is enormous and it has been shown that only Escherichia coli can produce about 200 different types of polysaccharides. The capsule may also consist of peptidoglycan (as the cell wall), poly-muramic acid (one of the cell wall components), glycoproteins and poly-D-glutamic acid as in Bacillus anthracis. To be able to see the capsule in a microscope, one can use a special capsule staining method with methylene blue and this has been utilized for B. anthracis (see the bacterial page).
The capsule is considered a pathogenicity factor, as it can increase the ability of bacteria to cause disease. The capsule protects the bacterium from phagocytosis of macrophages. The capsule contains water and, therefore, protects bacteria from dehydration. The capsule increases the ability of bacteria to bind to surfaces and to each other. When bacteria form a biofilm, they are less susceptible to antibiotics and some other bacteriostatic agents. The capsule can also protect bacteria from attack by certain bacteriofages.