chemcheat

Lewis structure generator

Type a molecule, an ion or an ionic compound. You get the structure, where every electron went, and the working, drawn one stage at a time.

Charges go at the end: NH4+, SO4 2-. Organic molecules in bonding order: CH3CH2OH.

CH3COOH Lewis structure

Lewis structure of CH3COOHThe atoms around the centre are not all the same, so the bond dipoles are different sizes and cannot cancel.CCOOHHHH

CH3COOH has 24 valence electrons, drawn as one C–C bond, one C=O bond, one C–O bond and four bonds to hydrogen. The central C is sp2 hybridized and the shape is trigonal planar.

Draw it step by step

  1. CH3COOH Lewis structure, stage 1: SkeletonCCOOHHHH

    14 of 24 placed

    Skeleton. Join every connected pair with one bond. 7 bonds spends 14 electrons.

  2. CH3COOH Lewis structure, stage 2: Outer octetsCCOOHHHH

    24 of 24 placed

    Outer octets. Spend electrons as lone pairs on the outer atoms. That uses the entire budget, and the central atom has nothing left over.

  3. CH3COOH Lewis structure, stage 3: Multiple bondsCCOOHHHH

    24 of 24 placed

    Multiple bonds. The central atom is still short of an octet, so one lone pair on the outer atoms moves in to be shared. The electron count does not change - the same electrons are just counted by both atoms now.

  1. Count the valence electrons

    Add up the outer-shell electrons every atom brings. That total is the budget for the whole structure - every line and every dot has to come out of it, and nothing may be added.

    2 x 4 (C) + 4 x 1 (H) + 2 x 6 (O) = 24 valence electrons
  2. Work out what is bonded to what

    Read as a condensed structural formula: each atom bonds to the one written before it that still has room, and hydrogens belong to the atom they follow. That is what tells CH3COOH apart from its isomers.

  3. Join everything with single bonds first

    Every connection starts as one shared pair. Draw them all before worrying about double bonds - the arithmetic in the next step is what tells you where the double bonds have to go.

    7 bonds x 2 = 14 electrons used, 10 left
  4. Work out how far short you are

    Add up what every atom still needs to fill its shell - eight electrons for most atoms, two for hydrogen - minus what its single bonds already give it. Compare that with the electrons you have left. The difference decides everything that follows.

    needs 12, has 10, short by 2
  5. Turn the shortfall into multiple bonds

    Being short means atoms have to share more. Every pair that moves from a lone pair into a bond counts twice - once for each atom - so a shortfall of 2 is covered by 1 extra shared pair. That is where the double bond comes from.

    C2=O1
  6. Fill in the lone pairs

    Every electron not in a bond sits as a lone pair on an atom. Each atom takes exactly what it needs to finish its shell - there is no choice left at this point.

    O1: 2, O2: 2 (8 electrons)
  7. Check the formal charges

    Formal charge is valence electrons, minus lone-pair electrons, minus the number of bonds. Every atom here comes out at zero, which is the sign of a good structure.

    all formal charges = 0
  8. Work out the shape

    Count the electron domains on C: 3 bonded groups. A double or triple bond still counts as one domain, because it points in one direction. That gives trigonal planar electron geometry; ignore the lone pairs and the atoms themselves sit in a trigonal planar arrangement.

    steric number 3 -> sp2 -> trigonal planar, bond angle 120
  9. Decide whether it is polar

    The atoms around the centre are not all the same, so the bond dipoles are different sizes and cannot cancel.

    dipoles do not cancel -> polar

What you can type

You wantTypeNotes
A moleculeXeF4, SO2, HCNThe usual molecular formula.
A polyatomic ionNO3-, SO4 2-, NH4+A charge of 2 or more needs a space before it, or SO42- reads as a subscript.
An organic moleculeCH3COOH, CH3OCH3, (CH3)2COWrite the atoms in the order they are bonded. That is what tells ethanol from dimethyl ether.
An ionic compoundNaCl, CaCO3, Fe2(SO4)3Drawn as ions. Transition-metal charges are worked out from the anion.
An element's Lewis symbolC, O, Cl-One dot per side before any pair up.

Lowercase is fine when there is only one sensible reading - co2 is CO2, nacl is NaCl - and subscripts pasted from a textbook, like SO₄²⁻, are read as typed.

How it draws a structure

  1. Count the valence electrons, adding one for each negative charge and removing one for each positive charge. That total is the budget, and nothing may be added later.
  2. Decide what is bonded to what. For a simple molecule the least electronegative atom goes in the middle. An acid keeps its hydrogens on oxygen. A condensed formula is read in the order it is written.
  3. Join every connected pair with a single bond, then give each atom the lone pairs it needs to fill its shell.
  4. Try every arrangement of double and triple bonds the electron count allows, and keep the one that fills the most octets with the smallest formal charges. Structures that tie are resonance forms, and all of them are shown.
  5. Read the shape off the result. The electron domains on each central atom give the geometry, the bond angle and the hybridization - the same way the VSEPR chart is read.

Nothing is looked up: the structure for a formula no one has asked about before is found the same way as the one for CO2.

What it will not draw, and why

Molecular formulas with several isomers. C2H4O is acetaldehyde or ethylene oxide, and drawing one of them as though it were the answer would be wrong half the time. The generator asks for the condensed formula instead.

Transition-metal molecules. The octet rule does not describe how a transition metal bonds, so a Lewis structure of one would look confident and be wrong. Their salts - FeCl3, CuSO4 - are drawn as ions, which is how a course treats them.

Rings, other than benzene. A molecular formula does not say whether atoms close into a ring, so chains are drawn open.

Worked examples

These have their own pages, with the full explanation, common questions and related structures. The Lewis structure chart compares every one of them.

Common questions

What can I type into the Lewis structure generator?

A molecular formula (CO2, XeF4), an ion with its charge (SO4 2-, NH4+, NO3-), a condensed structural formula for organic molecules (CH3COOH, CH3CH2OH, (CH3)2CO), an ionic compound (NaCl, CaCO3, Fe2(SO4)3) or a single element for its Lewis dot symbol. Lowercase and pasted subscripts such as SO₄²⁻ are read too.

How do I enter the charge on an ion?

Put the charge after the formula. A single charge can go straight on the end (NO3-, NH4+). A charge of two or more needs a space so it is not read as a subscript: SO4 2-, PO4 3-, CO3 2-.

Why does it ask me to rewrite C2H4O?

Because C2H4O is more than one molecule - acetaldehyde and ethylene oxide share that formula. A molecular formula with two or more carbons does not say how the atoms are joined, so write it in bonding order as a condensed formula, such as CH3CHO, and the generator draws exactly that molecule.

How does it draw ionic compounds like NaCl?

As ions, not as a molecule. The metal gives up its valence electrons and the non-metal takes them, so NaCl is drawn as [Na]+ next to [Cl]- with a full octet of dots. There is no bond line, because nothing is shared.

Why does it show two structures for SO2 and SO4 2-?

Courses disagree about period 3 atoms. One convention keeps every atom at eight electrons and accepts formal charges; the other lets the central atom hold more than eight and minimises formal charge. The generator shows both and says which is which.

Is it free?

Yes. It runs entirely in your browser, with no sign-up and no limit on how many structures you draw.