Gram-positive and Gram-negative bacteria differ fundamentally in how they build the envelope that surrounds their cells. Gram-positive species wrap themselves in a thick mesh of peptidoglycan threaded with unique polymers called teichoic acids. Gram-negative species use a thinner peptidoglycan layer but add a second, outer membrane studded with a molecule called lipopolysaccharide. That structural split, first revealed by a simple staining technique developed in the 1880s, turns out to drive real differences in how bacteria resist antibiotics, trigger immune responses, and survive hostile environments.
How the Gram Stain Exposes the Difference
The Gram stain works because the two cell-wall architectures handle a decolorizing solvent differently. Both types of bacteria initially absorb crystal violet dye, which is then locked in place by iodine. When an alcohol-based decolorizer is applied, Gram-positive bacteria keep the dye because their thick peptidoglycan layer shrinks and traps the crystal violet-iodine complexes inside. Gram-negative bacteria lose it because the alcohol dissolves the lipid-rich outer membrane and washes the dye out through their much thinner peptidoglycan. A counterstain, usually safranin, is then applied, turning the now-colorless Gram-negative cells pink while the Gram-positive cells remain purple. The whole procedure takes a few minutes, and it remains one of the first things a clinical microbiologist does when trying to identify an unknown bacterium.
The Gram-Positive Wall Up Close
The defining feature of a Gram-positive cell wall is its thick peptidoglycan layer, which can be 20 to 80 nanometers deep. Peptidoglycan is a mesh-like polymer made of sugar chains cross-linked by short peptide bridges. Solid-state NMR studies of Staphylococcus aureus show that these sugar chains are surprisingly ordered, adopting a helical structure with a repeating unit spacing of about 40 ångströms, and that the cross-linking bridges between chains are oriented in parallel, creating a dense, organized lattice.1PubMed Central. Peptidoglycan architecture of Gram-positive bacteria by solid-state NMR That dense mesh is what gives the wall its mechanical strength and lets it retain the crystal violet dye during staining.
Woven through this peptidoglycan are teichoic acids, polymers found only in Gram-positive bacteria. There are two main varieties. Wall teichoic acids are covalently attached to the peptidoglycan itself, while lipoteichoic acids are anchored into the cell membrane below.2PubMed Central. Structural diversity and biological significance of lipoteichoic acid in Gram-positive bacteria: focusing on beneficial probiotic lactic acid bacteria – Section: Abstract Chemically, lipoteichoic acids are chains of alternating sugar-alcohol units and phosphate groups.3PubMed Central. Lipoteichoic acids, phosphate-containing polymers in the envelope of gram-positive bacteria These molecules do more than just fill space. They help regulate cell division, maintain the charge environment near the cell surface, and interact with the host immune system. Mutants that cannot produce lipoteichoic acid show serious growth defects, and modifications to the lipoteichoic acid backbone can protect bacteria against antimicrobial peptides produced by the host’s immune cells.4PubMed. Lipoteichoic acid synthesis and function in gram-positive bacteria
The Gram-Negative Envelope and Its Extra Membrane
Gram-negative bacteria take a different architectural approach. Instead of piling on peptidoglycan, they invest in a second lipid bilayer, the outer membrane, positioned outside a much thinner peptidoglycan layer. Between the inner (cytoplasmic) membrane and the outer membrane sits a compartment called the periplasm, which is packed with enzymes, folding machinery, and sensing equipment.5PubMed Central. The gram-negative bacterial periplasm: Size matters The periplasm functions almost like a separate organelle: it has its own chemical environment, distinct from the cytoplasm, that allows proteins to be folded and quality-checked before being sent to the outer membrane or secreted.6PubMed. Skp, a molecular chaperone of gram-negative bacteria, is required for the formation of soluble periplasmic intermediates of outer membrane proteins
The outer membrane itself is not a symmetrical lipid bilayer. Its inner face is made of ordinary phospholipids, but its outer face is dominated by lipopolysaccharide, or LPS.7PubMed Central. The Beauty of Asymmetric Membranes: Reconstitution of the Outer Membrane of Gram-Negative Bacteria – Section: Abstract Maintaining this asymmetry is not accidental; bacteria actively build and enforce it.8PubMed. How Bacteria Establish and Maintain Outer Membrane Lipid Asymmetry LPS has three parts: a lipid A anchor embedded in the membrane, a core sugar chain, and a variable outer polysaccharide called the O-antigen.9PubMed Central. Lipopolysaccharide endotoxins – Section: Abstract The lipid A portion is also known as endotoxin, and it is the part of LPS that the human immune system recognizes during infection, triggering inflammation through a receptor called TLR4.10Journal of Endotoxin Research. Invited review: Diversity of endotoxin and its impact on pathogenesis – Section: Abstract
Why the Outer Membrane Makes Gram-Negatives Harder to Kill
The outer membrane acts as a selective barrier that keeps many harmful molecules out, and that includes antibiotics. Due to this distinctive structure, Gram-negative bacteria are broadly more resistant to antibacterial agents than Gram-positive species.11PubMed Central. Resistance of Gram-Negative Bacteria to Current Antibacterial Agents and Approaches to Resolve It There are generally two routes a drug can take through the outer membrane: hydrophobic (fat-soluble) antibiotics can slip through the lipid portion, while hydrophilic (water-soluble) antibiotics need to pass through protein channels called porins.12PubMed Central. Outer membrane permeability and antibiotic resistance – Section: Abstract
The reality is more complicated than that tidy division suggests. Work on Pseudomonas aeruginosa, one of the most drug-resistant pathogens in hospitals, showed that a strain engineered to lack all 40 of its identifiable porins could still grow in rich medium and consume a wide variety of hydrophilic nutrients. Many antibiotics actually crossed the outer membrane through the lipid bilayer itself, not through porins at all, although molecules carrying multiple negative charges had a hard time getting through that route.13PubMed Central. Outer membrane permeability: Antimicrobials and diverse nutrients bypass porins in Pseudomonas aeruginosa This finding challenged a longstanding assumption that porins are the main gateway for drug entry, and it helps explain why developing new antibiotics against Gram-negative bacteria has been so difficult. If you design a drug to slip through porins, the bacterium can simply downregulate those porins. If you design one to cross the lipid bilayer directly, the asymmetric LPS layer resists penetration.
Gram-positive bacteria, by contrast, lack this outer membrane entirely. Their thick peptidoglycan is porous to most small molecules, so antibiotics that target internal machinery can reach their targets more easily. Drugs like penicillin, which attack the enzymes that build peptidoglycan cross-links, are highly effective against many Gram-positives. The same drugs often struggle against Gram-negatives not because the target is different, but because the drug cannot get past the outer membrane in sufficient concentrations.
How Lysozyme Exploits the Wall, and How Bacteria Fight Back
Your body produces a natural weapon against bacterial cell walls: lysozyme. This enzyme, found in tears, saliva, nasal secretions, and breast milk, chops the sugar backbone of peptidoglycan by breaking a specific chemical bond between its two repeating sugar units.14PubMed Central. Lysozyme and Its Application as Antibacterial Agent in Food Industry – Section: Abstract In Gram-positive bacteria, where peptidoglycan is the outermost structural layer, lysozyme can attack directly. In Gram-negative bacteria, the outer membrane shields the thin peptidoglycan from lysozyme, so the enzyme is far less effective unless the outer membrane is first disrupted.
Even among Gram-positives, lysozyme does not work equally well on all species. Staphylococcus aureus, for instance, has rendered its peptidoglycan completely resistant to lysozyme. It achieves this through a combination of chemical modifications to its peptidoglycan, the presence of wall teichoic acids, and a high degree of cross-linking in the mesh.15PubMed Central. Influence of wall teichoic acid on lysozyme resistance in Staphylococcus aureus This is a good reminder that “Gram-positive” and “vulnerable to lysozyme” are not the same thing. Bacteria evolve workarounds.
How the Immune System Tells Them Apart
Your immune system has dedicated molecular sensors, called Toll-like receptors, that recognize specific bacterial wall components. The system roughly mirrors the Gram-positive/Gram-negative divide. Gram-positive bacteria are detected primarily through Toll-like receptor 2, which recognizes peptidoglycan and lipoteichoic acid. Experiments showed that cells expressing human TLR2, but not TLR4, responded to Staphylococcus aureus and Streptococcus pneumoniae.16The Journal of Immunology. Cutting Edge: Recognition of Gram-Positive Bacterial Cell Wall Components by the Innate Immune System Occurs Via Toll-Like Receptor 2 When researchers directly tested purified peptidoglycan, it activated immune cells through TLR2, and mice lacking TLR2 could barely produce key inflammatory signals in response to it.17Immunity. Cutting Edge: TLR2-Deficient Mice Exhibit a Normal Response to Lipopolysaccharide but Impaired Response to Gram-Positive Bacterial Cell Wall Components – Section: Results
Gram-negative bacteria, on the other hand, trigger inflammation largely through TLR4, which recognizes the lipid A portion of LPS. The clinical consequence is that Gram-negative sepsis involves a massive LPS-driven inflammatory cascade, sometimes called endotoxic shock, that differs in its triggers from the inflammation caused by Gram-positive infections. Despite the different molecular signals, the downstream immune responses can look strikingly similar, which is why severe bloodstream infections by either type can progress to organ failure and death. Researchers have pointed out that this clinical similarity stems from the fact that both TLR2 and TLR4 feed into overlapping signaling pathways inside immune cells.16The Journal of Immunology. Cutting Edge: Recognition of Gram-Positive Bacterial Cell Wall Components by the Innate Immune System Occurs Via Toll-Like Receptor 2
When Bacteria Remodel Their Own Walls
Cell walls are not static structures. Bacteria constantly break down and rebuild their peptidoglycan as they grow and divide, using enzymes called autolysins that selectively cut bonds in the mesh. Environmental stresses like nutrient starvation, temperature shifts, pH changes, or exposure to antibiotics can ramp up autolysin activity. Sometimes this self-digestion serves the individual cell, for example by letting it reshape its wall to adapt. In other cases, a subpopulation of cells undergoes programmed death, releasing nutrients and DNA that benefit the surviving community.18Biochemical Society Transactions. Mechanisms conferring bacterial cell wall variability and adaptivity
Both Gram-positive and Gram-negative bacteria produce extracellular vesicles, small bubble-like structures pinched off from their envelope. In Gram-negatives, these bud from the outer membrane and carry LPS, outer membrane proteins, and sometimes DNA or toxins. In Gram-positives, producing vesicles is trickier because the thick peptidoglycan should theoretically block budding. They still manage it, though the mechanisms are less understood. These vesicles from both types of bacteria are enriched with bioactive proteins, lipids, nucleic acids, and virulence factors, and they serve roles in communication, immune evasion, and delivering toxins to host cells at a distance.19PubMed. Gram-negative and Gram-positive bacterial extracellular vesicles
Bacteria That Break the Rules
The Gram-positive/Gram-negative classification covers most bacteria people encounter clinically, but several important groups do not fit neatly into either camp.
Mycobacteria, the group that includes the tuberculosis pathogen, stain Gram-positive in theory but are notoriously difficult to stain at all. Their cell wall contains a massive layer of mycolic acids, unique long-chain fatty acids that form a waxy, hydrophobic barrier outside the peptidoglycan.20PubMed Central. Mycolic acids: deciphering and targeting the Achilles’ heel of the tubercle bacillus – Section: Abstract This layer is so impermeable that mycobacteria require a special staining technique using heated dye and acid washes: the acid-fast stain. Genetically engineered mutants of Mycobacterium tuberculosis that produce shorter-than-normal mycolic acids lose their acid-fast staining property entirely.21PubMed Central. Deletion of kasB in Mycobacterium tuberculosis causes loss of acid-fastness and subclinical latent tuberculosis in immunocompetent mice Analysis of various mutants points to mycolic acids and associated cell-wall lipids as the primary molecules responsible for the acid-fast property.22PubMed Central. Acid-Fast Positive and Acid-Fast Negative Mycobacterium tuberculosis: The Koch Paradox Mycobacteria’s extraordinary cell wall is a major reason tuberculosis is so hard to treat: most standard antibiotics simply cannot penetrate it.
Then there are L-form bacteria, which have shed their cell walls altogether. Under certain conditions, bacteria can lose their peptidoglycan and survive as fragile, irregularly shaped cells. Research using Bacillus subtilis showed that L-forms grow robustly in a protective osmotic medium and reproduce by an unusual blebbing mechanism completely independent of the normal cell-division machinery. Antibiotics that block cell-wall synthesis, like fosfomycin, can efficiently trigger the L-form switch in a wide range of bacteria, including Escherichia coli.23PubMed Central. Cell wall-deficient, L-form bacteria in the 21st century: a personal perspective L-forms can be unstable, reverting to their walled state once the stress is removed, or stable through specific genetic mutations.24PubMed Central. Bacterial L-forms: Key Mechanisms of Drug Resistance, Disease Recurrence, and Immune Evasion – Section: Abstract The clinical worry is that L-forms could persist inside a patient’s body during antibiotic treatment, hiding from drugs that target the cell wall, then revert and cause a relapse once the antibiotic course ends.
S-Layers and External Coats
Some bacteria add yet another layer outside everything described above: a surface layer, or S-layer, made of repeating protein or glycoprotein subunits arranged in a crystalline lattice. S-layers sit in different positions depending on cell type. In Gram-positive bacteria, the S-layer attaches directly to the rigid peptidoglycan. In Gram-negative bacteria, it adheres to the lipopolysaccharide of the outer membrane.25PubMed Central. S‐layers: principles and applications S-layers can serve as molecular sieves, protective shields, or scaffolds for enzymes. They are common in archaea too, sometimes functioning as the primary structural component of the cell envelope in organisms that lack peptidoglycan entirely. Their existence is a reminder that the textbook two-category system describes the most common arrangements, not the full diversity of what microbial envelopes can look like.
The Evolutionary Puzzle
A natural question is which came first: the single-membrane (Gram-positive-like) plan or the double-membrane (Gram-negative-like) plan? For a long time, many microbiologists assumed that the simpler monoderm (one-membrane) architecture was ancestral and that the outer membrane was added later. Recent phylogenomic analysis has flipped that thinking. Within the Firmicutes, a phylum traditionally considered Gram-positive, researchers have found multiple lineages that possess two membranes, so-called diderm Firmicutes. The evidence suggests the double-membrane architecture is actually the ancestral state in this phylum, and that the familiar monoderm Gram-positive cell plan arose multiple times independently through loss of the outer membrane. Given the overwhelming prevalence of diderm phenotypes across the bacterial tree of life, this scenario likely extends to the ancestor of all bacteria.26PubMed. One or two membranes? Diderm Firmicutes challenge the Gram-positive/Gram-negative divide
If that is correct, then Gram-positive bacteria are not “simpler” organisms that never evolved an outer membrane. They are descendants of double-membraned ancestors that lost one. The thick peptidoglycan wall may have expanded to compensate for the missing barrier, taking over some of the protective and structural functions the outer membrane once provided. This reframing does not change anything about how clinicians treat infections today, but it does reshape how microbiologists think about the diversity and history of bacterial cell envelopes. The neat purple-versus-pink division that a Gram stain provides in the lab turns out to be a snapshot of a far messier evolutionary story.