Lewis dot structure generator

Type a molecule or ion. You get the lone pairs, formal charges, resonance structures and VSEPR shape, worked out step by step.

Examples

6 resonance structures

Show

Convention: second-row atoms keep eight. From the third row down, double bonds to oxygen are added until the center has no formal charge.

SO₄²⁻ Sulfate Ion

S O O O − O − 2−

Valence electrons

32 e⁻

VSEPR class

AX₄

Shape

Tetrahedral

Bond angle

109.5°

Hybridization

sp³

Polarity

Ion

How SO₄²⁻ is solved

32 of 32 electrons placed: 8 in bonds, 24 in lone pairs

S O O O O
Give the outer atoms their octets, in pairs. Hydrogen needs none.

Pick a VSEPR shape, see it form

Four rules for drawing a Lewis structure

Count the electrons

Add every atom’s valence electrons. A negative charge adds electrons, a positive charge removes them.

Choose the center

The least electronegative atom, never hydrogen. In oxyacids the hydrogens sit on oxygen.

Keep second-row atoms at eight

Carbon, nitrogen, oxygen and fluorine never hold more. Beryllium and boron may hold fewer.

Keep formal charges small

Formal charge is valence electrons, minus lone-pair electrons, minus bonds. Below the second row, double bonds to oxygen bring it to zero.

How to use the Lewis structure generator

Lewis structure of the sulfate ion: sulfur in the center, two S=O double bonds, two single-bonded oxygens with a negative charge, in brackets with 2−
Lewis structure of sulfate, SO₄²⁻, as drawn by the generator. It is one of six equivalent resonance structures.

Type the formula

Write a molecule such as H2O or C2H4. Write an ion with its charge, as in NO3- or SO4^2-. Subscripts are typed as plain numbers, and capital letters matter: CO is carbon monoxide, Co is cobalt.

Read the Lewis structure

Lines are bonding pairs and dots are lone pairs. Small circled signs are formal charges. Square brackets with a number mark the charge of the whole ion. Each of these can be switched off.

Step through the resonance

When more than one Lewis structure is valid, numbered buttons list them. Nitrate has three and sulfate has six. The real molecule is one average of all of them, not a switch between them.

Turn it into a shape

Press Shape to see the Lewis structure in three dimensions. Bonds and lone pairs repel each other until they settle, so you can see why water is bent and ammonia is a pyramid.

Name the exact compound

Some formulas fit several compounds. For C2H6O the tool asks whether you mean C2H5OH or CH3OCH3, because each has its own Lewis structure.

Take the figure with you

A 72 DPI preview of the Lewis structure is free. A pass adds SVG, TikZ for Overleaf and a 300 DPI PNG.

Lewis structure examples

Water, H₂O

Eight valence electrons. Two O–H bonds use four of them and the other four are two lone pairs on oxygen. The Lewis structure looks flat, but the molecule is bent at 104.5°.

Carbon dioxide, CO₂

Sixteen valence electrons. Carbon makes a double bond to each oxygen, so every atom has eight and every formal charge is zero. With no lone pair on carbon, the shape is linear.

Nitrate, NO₃⁻

Twenty-four valence electrons, counting one for the charge. Nitrogen has one double bond and two single bonds, with +1 on nitrogen and −1 on each single-bonded oxygen. The double bond can be in three places.

Xenon tetrafluoride, XeF₄

Thirty-six valence electrons. Xenon holds four bonds and two lone pairs, twelve electrons in all. The lone pairs sit opposite each other, which leaves a flat square.

What the generator does not draw

Odd-electron molecules

NO and NO₂ have an unpaired electron. One closed-shell Lewis structure cannot show it, so the generator says so instead of drawing one.

Transition metals

Counting to eight does not describe metal complexes well. The generator covers main-group elements only.

Connectivity it has not checked

For larger molecules a formula does not fix which atom is bonded to which. If the arrangement is not in the checked library, you get a message and no Lewis structure.

Lewis structure questions

How does the Lewis dot structure generator determine the central atom?

The solver takes the least electronegative non-hydrogen atom as the center, because hydrogen holds only two electrons. Oxyacids and molecules with several centers, such as H2SO4, HNO3, H2O2 and CH3COOH, come from a checked connectivity library. If a formula fits more than one structure, the tool says so instead of guessing.

How are formal charges calculated on polyatomic ions like SO4^2- and NO3-?

Valence electrons, minus lone-pair electrons, minus bonds, for each atom. Second-row atoms keep eight electrons. For third-row centers and below, double bonds to oxygen are added until the center has no formal charge. Some courses keep the octet instead.

Does it show equivalent resonance structures and VSEPR bond angles?

Yes. Carbonate, nitrate, ozone and others list every resonance structure. Angles are measured values where one is listed, and otherwise a bound such as less than 109.5°.

Can I export my Lewis dot diagram to LaTeX or Illustrator?

Yes. The $9.90 Semester Pass exports SVG, TikZ and 300 DPI PNG. A 72 DPI preview is free.