🧪 Lewis Dot Generator: Draw Electron Structures Instantly

Imagine you’re sitting in chemistry class, staring at the formula NH₃ on your test paper. You know you need to draw its Lewis dot structure — but you can’t remember whether nitrogen gets a lone pair or not. 😰 That moment of panic is exactly why I built this tool.
A Lewis dot structure shows every valence electron in a molecule as a dot or a bond line. Getting it right means knowing the total electron count, the octet rule, and where to place lone pairs — skills that show up on every chemistry exam from high school through university.
In this guide you’ll get a fully working Lewis dot generator, three detailed worked examples, a visual diagram, and a clear explanation of the rules — so you understand the why, not just the answer.
A Lewis dot generator draws electron dot structures by calculating total valence electrons for a molecule, placing the least electronegative atom at the center, forming single bonds, completing outer-atom octets, and distributing remaining electrons as lone pairs — then upgrading to double or triple bonds if needed. For H₂O: 8 total valence electrons, 2 O–H bonds, 2 lone pairs on oxygen.
- 🔵 Valence electrons = the key number; count them first for every atom.
- 🟠 The least electronegative atom (usually carbon) goes in the center.
- 🟢 Outer atoms get their octets filled before the central atom.
- 🔴 Hydrogen always stops at 2 electrons — never 8.
- ⭐ Use the generator below to check any common molecule instantly.
- 📐 Formal charge math tells you which structure is the best one.
🧮 Interactive Lewis dot generator
🚀 Quick-pick a molecule:
How to use this Lewis dot generator
- Click any preset molecule button (H₂O, CO₂, NH₃, etc.) for an instant result.
- Or type a formula in the text box (e.g.
CH4,SO2) and press Enter. - Click the orange Generate Structure button.
- Read the total valence electron count and bonding pairs in the result card.
- Study the ASCII Lewis dot diagram — dots are lone pairs, lines are bonds.
- Follow the numbered step-by-step solution to understand the construction logic.
🎨 Visual solution: H₂O, CO₂, and NH₃ side by side
Seeing three structures together reveals the pattern: every molecule starts with the same counting process, but the number of lone pairs and bond types changes based on the total electron count.
🔬 Lewis Dot Diagrams — Three Core Molecules
WATER (H₂O) CARBON DIOXIDE (CO₂) AMMONIA (NH₃)
───────────── ────────────────────── ─────────────
•• •• •• •• •• ••
H — O — H O = C = O N
•• •• •• •• •• /|\
H H H
Total VE: 8 Total VE: 16 Total VE: 8
Bonds: 2 single Bonds: 2 double Bonds: 3 single
Lone pairs on O: 2 Lone pairs on each O: 2 Lone pair on N: 1
Shape: Bent Shape: Linear Shape: Trigonal pyramidal
Notice that CO₂ needs double bonds because single bonds leave carbon with only 4 electrons. That’s the octet rule forcing an upgrade — a pattern you’ll see repeatedly in chemistry.
Sources & References
Written and fact-checked by Dr Irfan Mansuri. External links open in a new tab and are provided for further reading and verification.
