Type a formula such as H2O, NO3- or SO4^2- to draw its Lewis dot structure. You get the valence electron count, bonds, lone pairs, formal charges, resonance forms and the VSEPR shape, with every step explained.
Last updated:
Lewis structure
Total valence electrons–
Step by step
Atoms and formal charges
Atom
Valence e⁻
Bonds
Lone pairs
e⁻ around atom
Formal charge
Advertisement
Advertisement
How to use the Lewis Structure Generator
Type a formula, ion or name, for example CO2, NH4+, SO4^2- or ozone. Put the charge after a caret or a space so it isn't read as a subscript.
Press Draw structure or tap one of the examples.
Read the drawing: lines are shared pairs, green dots are lone-pair electrons and orange circles show nonzero formal charges.
Step through resonance forms when the molecule has more than one equivalent structure.
Check the steps and atom table, then download the structure as an SVG or PNG for homework or slides.
How to draw a Lewis structure
Count valence electrons. Add up the group valence electrons of every atom, add one for each negative charge and subtract one for each positive charge.
Draw the skeleton. Put the least electronegative atom (never H or F) in the center and connect every outer atom to it with a single bond. Each bond uses two electrons.
Complete the outer atoms. Give each outer atom lone pairs until it has an octet (hydrogen needs only two electrons).
Put leftover electrons on the central atom. Period 3 and heavier atoms may go beyond eight electrons.
Form multiple bonds if needed. If the central atom still lacks an octet, move a lone pair from an outer atom into a double or triple bond.
Check formal charges. Choose the arrangement with formal charges closest to zero, putting negative charges on the most electronegative atoms.
Formal charge of an atom = valence electrons − lone-pair electrons − number of bonds (each single, double or triple bond counts as 1, 2 or 3).
Valence electrons of main-group elements
Group
Valence e⁻
Elements
Usual bonds (neutral)
1
1
H, Li, Na, K
1 (H); metals form cations
2
2
Be, Mg, Ca
2 (Be); metals form cations
13
3
B, Al
3, often with an incomplete octet
14
4
C, Si
4
15
5
N, P, As
3 plus one lone pair
16
6
O, S, Se
2 plus two lone pairs
17
7
F, Cl, Br, I
1 plus three lone pairs
18
8
Ne, Ar, Kr, Xe
0 (Xe and Kr can form expanded-octet compounds)
VSEPR shapes at a glance
Electron domains
Lone pairs
Shape
Example
2
0
Linear (180°)
CO₂
3
0 / 1
Trigonal planar / bent
BF₃ / SO₂
4
0 / 1 / 2
Tetrahedral / trigonal pyramidal / bent
CH₄ / NH₃ / H₂O
5
0 / 1 / 2 / 3
Trigonal bipyramidal / seesaw / T-shaped / linear
PCl₅ / SF₄ / ClF₃ / XeF₂
6
0 / 1 / 2
Octahedral / square pyramidal / square planar
SF₆ / BrF₅ / XeF₄
A Lewis structure shows which atoms are connected and where the electrons are. It is a flat drawing, so the angles in the picture are not the real bond angles. The VSEPR shape describes the actual 3D geometry. To work out molar masses for the same formulas, use the Molar Mass Calculator.
Frequently asked questions
How do you count valence electrons for a Lewis structure?
Add the valence electrons of every atom (the group number for main-group elements: H 1, C 4, N 5, O 6, halogens 7), then add one electron for each negative charge or subtract one for each positive charge. For SO4²⁻: 6 + 4 × 6 + 2 = 32.
How is the central atom chosen?
The central atom is usually the least electronegative atom that is not hydrogen, often the one that appears only once in the formula, such as C in CO2 or S in SO4²⁻. Hydrogen and fluorine are always terminal because they form only one bond.
What is formal charge?
Formal charge = valence electrons − nonbonding (lone-pair) electrons − number of bonds. The best Lewis structure usually has formal charges as close to zero as possible, with any negative charge on the more electronegative atom. The formal charges always add up to the overall charge.
Why does sulfate show two double bonds instead of all single bonds?
Sulfur is in period 3 and can hold more than eight electrons. Two S=O double bonds give sulfur a formal charge of 0 instead of +2, so many textbooks draw it that way. If your course requires the octet rule, untick "Allow expanded octets" to get the all-single-bond structure with S at +2.
What are resonance structures?
When the same atoms can be connected with the double bonds in different places, such as the three equivalent forms of nitrate (NO3⁻), each drawing is a resonance form. The real ion is a blend of them, with all N–O bonds the same length. Use Next resonance form to see each one.
Which molecules can this tool draw?
Molecules and ions of main-group elements with up to 24 atoms and no rings: simple molecules, polyatomic ions, oxyacids, small organic molecules and simple ionic compounds. Rings (benzene), transition-metal complexes and very large molecules are not supported. For formulas with several isomers, write a condensed formula such as CH3OCH3 to choose the skeleton.
Why are some atoms short of an octet?
Boron, beryllium and aluminum are stable with fewer than eight electrons (BF3, BeCl2), and molecules with an odd number of electrons, such as NO and NO2, must have one unpaired electron.
Are all the tools on FreeToolCabin tested for quality and accuracy?
Yes! Every tool on our site undergoes automated Q/A testing in real browser environments to ensure high precision, correct output, and zero errors. If you happen to spot a bug or have a suggestion, please contact us at [email protected] and our team will review it right away.