Supported elements: H, Be, B, C, N, O, F, Al, Si, P, S, Cl, Br, Kr, I, Xe. Covers one central atom with up to six atoms around it, and two-atom molecules.

H2O Lewis structure

Lewis structure of H₂OOHH
Lines are shared pairs, dots are lone-pair electrons, and blue numbers are nonzero formal charges.
Valence electrons
8
Central atom
O, two lone pairs
Electron geometry
tetrahedral
Molecular geometry
bent (AX2E2)
Bond angle
104.5°
Polarity
polar

Step by step

  1. Count valence electrons. H 2 × 1 + O 6 = 8 valence electrons (4 pairs).
  2. Choose the central atom. Put O in the center: it is the least electronegative atom other than H, and H can only form one bond, so it is always on the outside.
  3. Connect with single bonds. Two single bonds to the outer atoms use 4 electrons, leaving 4.
  4. Complete the outer atoms. Each outer H already has 2 electrons from its bond, so it needs no lone pairs. That leaves 4.
  5. Place the rest on O. Put the remaining 4 electrons on O as two lone pairs.
  6. Check the central atom. No multiple bonds are needed: O has 8 electrons and the formal charges are already as close to zero as possible.
  7. Count pairs. Two bonding pairs and two lone pairs (2 on O): 8 electrons in all.
  8. Formal charges. Formal charge = valence electrons − lone-pair electrons − bonds. The charges add up to 0, the overall charge.
    • O (center): 6 − 4 − 2 = 0
    • H with a single bond (×2): 1 − 0 − 1 = 0
  9. VSEPR shape. O has two bonded atoms and two lone pairs (AX2E2): 4 electron groups. Electron geometry: tetrahedral. Molecular geometry: bent. Bond angle: 104.5°.
  10. Polarity. Polar: lone pairs on O make the bent shape uneven, so the bond dipoles do not cancel.

Everything runs in your browser; nothing you choose is uploaded or saved. Print opens a clean page without the controls or advertisements. Diagrams are simplified teaching drawings, so check your class notes for the exact parts your teacher wants you to know.

How to use the Lewis structure generator

Type a formula and press Draw structure, or pick one of the examples. Write each element symbol with a capital first letter and put the count after it, as in CH2O or XeF4. For an ion, add the charge at the end (NH4+, CN-, CO3^2-) or choose it from the Charge menu.

The drawing shows bonds as lines, lone pairs as dot pairs and any nonzero formal charge in blue next to its atom. Ions are drawn in brackets with the overall charge outside. Below the drawing, the steps repeat the textbook method so you can check your own work line by line. Download SVG saves the drawing, and Print opens a clean page with the drawing and the steps.

The method behind each drawing

The generator adds up the valence electrons, adding one for each negative charge and removing one for each positive charge. It puts the least electronegative atom other than hydrogen in the center, joins every outer atom with a single bond, completes the outer octets (two electrons for hydrogen), and puts the remaining electrons on the central atom. If carbon, nitrogen, oxygen or fluorine in the center still lacks an octet, lone pairs from outer atoms become double or triple bonds.

When more than one structure is possible, it picks the one with formal charges closest to zero, with any negative charge on the more electronegative atom. Atoms in period 3 and below may hold more than eight electrons when that lowers the formal charges. That is why sulfate is drawn with two S=O double bonds; the page also shows the all-single-bond version for classes that keep sulfur to an octet. Last, VSEPR counts the bonded atoms and lone pairs on the central atom to name the electron geometry, the molecular shape and the approximate bond angle.

  • Boron, beryllium and aluminum compounds such as BF3 keep fewer than eight electrons, because a double bond would give fluorine a positive formal charge.
  • Molecules with an odd number of electrons, such as NO and NO2, are drawn with one unpaired electron and labeled as radicals.
  • When the double bond could sit on any of several equivalent atoms, as in NO3- or O3, one resonance structure is drawn and the note gives the number of equivalent structures.

What it does not draw yet

The generator handles molecules and ions with one central atom, such as CH4, SF6 and ClO4-, plus two-atom molecules such as N2 and HCl. Chains and rings (C2H6, benzene) and acids where hydrogen bonds to oxygen (HNO3, H2SO4) need more than one central atom, so the tool says so instead of drawing a wrong structure.

Common questions

Why does sulfate show double bonds when my textbook shows single bonds?

Both drawings appear in textbooks. With four single bonds every atom has an octet but sulfur carries a +2 formal charge. Moving two lone pairs into S=O bonds brings the charges closer to zero. This tool shows the formal-charge version and describes the octet version in a note, so use whichever your class expects.

Why does BF3 have only six electrons around boron?

A B=F double bond would complete the octet, but it would put a negative formal charge on boron and a positive one on fluorine, the most electronegative element. The single-bond structure with zero formal charges is the accepted Lewis structure.

Does the drawing show the real 3D shape?

No. A Lewis structure is a flat map of bonds and electrons. The atoms are spaced to hint at the shape, but the VSEPR result in the panel is what tells you the geometry and bond angle.

Is the O2 structure correct?

It is the standard Lewis structure, with a double bond and all electrons paired. Real oxygen has two unpaired electrons, which Lewis structures cannot show; that needs molecular orbital theory.

Also on this site

More tools to try.

The studio notebook

A useful place to begin.

Clear steps, considered details, and ideas you can put to use.