Lewis Structure Generator: Draw Dot Structures Instantly

Lewis Structure Generator: Draw Electron Dot Diagrams Instantly

lewis structure generator
lewis structure generator
By Dr. Irfan Mansuri
August 2026
9 min read
High School Chemistry

Definition: A Lewis structure (electron dot diagram) is a 2D drawing of a molecule that shows every valence electron as either a bonding pair (shared line between atoms) or a lone pair (two dots on one atom). Developed by Gilbert N. Lewis in 1916, it is the foundation of understanding molecular shape, polarity, and reactivity in introductory chemistry.

Quick Answer: A Lewis structure shows how valence electrons are arranged around atoms in a molecule. To draw one: count total valence electrons, place the least electronegative atom in the center, connect atoms with single bonds, distribute remaining electrons to complete octets on outer atoms, then convert lone pairs to double or triple bonds if the central atom still needs electrons. Use the interactive generator below to do this automatically.

⚡ In Short

  • Lewis structures map every valence electron in a molecule as bonds or lone pairs.
  • The octet rule: most atoms need 8 electrons; hydrogen needs only 2.
  • Always place the least electronegative atom (not H) at the center.
  • Use the generator below: enter a formula, get an instant dot diagram.
  • Formal charge check confirms whether your structure is the most stable form.

Quick Facts

Fact Detail
Invented by Gilbert N. Lewis (1916)
Also called Electron dot diagram, dot structure, Lewis dot structure
What it shows Bonding pairs + lone pairs of valence electrons
Octet rule Most atoms stable with 8 valence electrons
H exception Hydrogen needs only 2 electrons (duet rule)
Expanded octets P, S, Cl can hold 10-12 electrons (Period 3+)
Used for Predicting shape (VSEPR), polarity, reactivity

Lewis Structure Generator
Enter a molecular formula to get an instant electron dot diagram


Choose a common molecule to see its full Lewis dot diagram and step-by-step solution.


Step-by-Step Solution

    How to Use This Lewis Structure Generator

    1. Select a molecular formula from the dropdown (e.g. H₂O, CO₂, NH₃).
    2. Click Generate Structure.
    3. Read the ASCII electron dot diagram — dots represent lone pair electrons, lines represent bonds.
    4. Follow the numbered step-by-step solution to understand how the structure was built.
    5. Use the same logic to draw structures for other molecules by hand.

    What Is a Lewis Structure?

    A Lewis structure is a 2D diagram that shows every valence electron in a molecule. Valence electrons are the outermost electrons of an atom — they are the ones that form chemical bonds. In a Lewis structure, bonding pairs appear as lines between atoms, and lone (non-bonding) pairs appear as dots on individual atoms.

    Gilbert N. Lewis introduced this notation in 1916 to explain why atoms combine in specific ratios. The model is still the first tool chemists reach for when analyzing a new molecule’s reactivity, polarity, or shape. According to the Khan Academy AP Chemistry guide on Lewis diagrams, mastering this skill is a prerequisite for understanding VSEPR theory, molecular polarity, and reaction mechanisms.

    The Five Rules for Drawing Lewis Structures

    These five rules apply to every molecule you will encounter in introductory chemistry:

    1. Count total valence electrons. Add the group-number valence electrons for every atom. For ions, subtract one electron per positive charge or add one per negative charge.
    2. Identify the central atom. The least electronegative non-hydrogen atom goes in the center. Hydrogen is always a terminal (outer) atom.
    3. Connect atoms with single bonds. Each single bond uses 2 electrons. Subtract these from your total.
    4. Complete octets on outer atoms first. Fill lone pairs on surrounding atoms until each has 8 electrons (2 for hydrogen). Subtract used electrons.
    5. Satisfy the central atom. If electrons remain, place them on the central atom. If the central atom still lacks an octet, convert lone pairs on outer atoms to double or triple bonds.
    Key Formula
    Bonding pairs = (Valence e⁻ used in bonds) / 2
    Lone pairs = (Remaining e⁻) / 2
    Formal Charge = Valence e⁻ − Lone pair e⁻ − (Bonding e⁻ / 2)

    Worked Examples: H₂O, CO₂, NH₃

    These three examples mirror exactly what the generator produces above. Work through them by hand, then verify with the tool.

    Example 1: Water (H₂O)

    Total valence electrons: O(6) + H(1)×2 = 8. Place O in the center. Form 2 O—H bonds (4 electrons used). Place remaining 4 electrons as 2 lone pairs on O. Result: O has 8 electrons, each H has 2. Octet satisfied. Formal charge on all atoms = 0.

    Example 2: Carbon Dioxide (CO₂)

    Total valence electrons: C(4) + O(6)×2 = 16. Place C in the center. After single bonds and filling O octets, C only has 4 electrons. Convert one lone pair from each O to a bonding pair, creating two double bonds (O=C=O). All atoms now have 8 electrons.

    Example 3: Ammonia (NH₃)

    Total valence electrons: N(5) + H(1)×3 = 8. Place N in the center. Form 3 N—H bonds (6 electrons). Place remaining 2 electrons as 1 lone pair on N. N has 8 electrons. This lone pair is what makes NH₃ a base in acid-base chemistry.

    Visual Solution: Three Classic Lewis Structures
      WATER (H2O)           CO2                  AMMONIA (NH3)
      
         ··                ··     ··                  ··
      H — O — H          :O = C = O:                  N
         ··                                          / | \
                                                    H  H  H
      
      Lone pairs on O: 2    Lone pairs on each O: 2   Lone pair on N: 1
      Total e⁻: 8           Total e⁻: 16              Total e⁻: 8
      Bonds: 2 single       Bonds: 2 double           Bonds: 3 single
      Shape: Bent           Shape: Linear             Shape: Trigonal pyramidal
        

    Lewis Structure vs. Other Molecular Diagrams

    Students often confuse Lewis structures with other representations. Here is how they differ:

    Diagram Type Shows Bonds Shows Lone Pairs Shows 3D Shape Best Used For
    Lewis Structure Yes (lines) Yes (dots) No (2D only) Electron counting, polarity prediction
    Structural Formula Yes (lines) No No Organic chemistry connectivity
    Ball-and-Stick Model Yes (sticks) No Yes Visualizing 3D geometry
    Space-Filling Model No No Yes Showing relative atom sizes
    VSEPR Diagram Yes Yes Yes (predicted) Predicting molecular geometry from Lewis

    Common Mistakes (And How to Avoid Them)

    Mistake 1: Placing hydrogen in the center. Hydrogen can only form one bond, so it is always a terminal

    Leave a Comment

    Your email address will not be published. Required fields are marked *

    Scroll to Top