Lewis Structure Generator: Draw Electron Dot Diagrams Instantly

Table of Contents
- Quick Answer
- In Short (TL;DR)
- Quick Facts
- Interactive Lewis Structure Generator
- How to Use This Tool
- What Is a Lewis Structure?
- The Five Rules for Drawing Lewis Structures
- Worked Examples: H2O, CO2, NH3
- Lewis Structure vs. Other Diagrams
- Common Mistakes (And How to Avoid Them)
- Unique Insight
- My POV
- FAQ
- Related Articles
- About the Author
- Sources & References
⚡ 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 |
Choose a common molecule to see its full Lewis dot diagram and step-by-step solution.
How to Use This Lewis Structure Generator
- Select a molecular formula from the dropdown (e.g. H₂O, CO₂, NH₃).
- Click Generate Structure.
- Read the ASCII electron dot diagram — dots represent lone pair electrons, lines represent bonds.
- Follow the numbered step-by-step solution to understand how the structure was built.
- 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:
- 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.
- Identify the central atom. The least electronegative non-hydrogen atom goes in the center. Hydrogen is always a terminal (outer) atom.
- Connect atoms with single bonds. Each single bond uses 2 electrons. Subtract these from your total.
- Complete octets on outer atoms first. Fill lone pairs on surrounding atoms until each has 8 electrons (2 for hydrogen). Subtract used electrons.
- 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.
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.
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
