Skip to content
ChemSolver

Lewis Structure Generator

Generate Lewis dot structures for molecules and polyatomic ions with valence electrons, bonds, lone pairs, formal charges, resonance, VSEPR geometry, and step-by-step explanations. Free in your browser—no sign-up required—with PNG/SVG downloads and one-click copy.

Popular Molecules and Ions

Choose a formula to open its worked drawing guide or run it directly in the generator. Common molecules, octet exceptions, radicals, and polyatomic ions are grouped below for quick comparison.

What This Lewis Dot Structure Generator Shows

Enter a chemical formula to count valence electrons, verify formal charges, and draw a complete bonding diagram for molecules and polyatomic ions directly in your browser.

  • Lewis dot diagrams: single, double, and triple bonds, lone-pair dots, unpaired radical electrons, and bracketed overall charges for ions.
  • Electron accounting & formal charges: valence electron breakdown, atom-by-atom formal charges, and octet-rule checks including incomplete and expanded octets.
  • Resonance, VSEPR & steps: equivalent resonance contributors, VSEPR electron and molecular geometry with approximate bond angles, and numbered drawing steps.
  • Free export & copy actions: download crisp PNG or SVG diagrams, copy the image, drawing steps, or text summary to your clipboard, and share a direct formula link with no account needed.

How to Use the Lewis Structure Generator

  1. Step 1

    Enter a chemical formula

    Type the formula of a molecule or polyatomic ion, such as H2O, CO2, NH3, BF3, or SO4^2-. Write single charges with a trailing sign (NO3-, NH4+) and larger charges with a caret (CO3^2-, SO4^2-).

  2. Step 2

    Click Generate Lewis Structure

    The generator counts valence electrons, selects the central atom, places lone pairs, forms multiple bonds where needed, and checks formal charges. Your diagram and breakdown appear immediately below the form.

  3. Step 3

    Review bonds, charges, and VSEPR shape

    Inspect the Lewis dot diagram alongside quick facts for valence electrons, lone pairs, formal charges, octet checks, equivalent resonance forms, and the VSEPR molecular geometry summary.

  4. Step 4

    Follow the steps or export the diagram

    Use the numbered step-by-step explanation to redraw the structure by hand, or download the diagram as PNG/SVG and copy the image, drawing steps, text summary, or shareable formula link.

How to Draw a Lewis Structure Step by Step

The generator follows the same seven-step method you use on paper. Here is the full workflow, using CO₂ as the running example.

  1. 1 Count the valence electrons

    Add the valence electrons of every atom, then add one electron per unit of negative charge or remove one per unit of positive charge. CO₂ has 4 from carbon and 2 × 6 = 12 from oxygen, giving 16 valence electrons in total.

  2. 2 Choose the central atom

    The least electronegative atom—excluding hydrogen—usually sits in the center. In CO₂ that is carbon, with the two oxygen atoms arranged around it.

  3. 3 Connect the atoms with single bonds

    Draw one single bond from each outer atom to the central atom. Each single bond uses two electrons, and hydrogen is complete with its duet of two electrons.

  4. 4 Complete the outer octets

    Place remaining electrons as lone pairs on the outer atoms until each reaches eight electrons. In CO₂, each oxygen takes three lone pairs, accounting for 12 more electrons.

  5. 5 Place leftover electrons on the central atom

    Any electrons still unplaced become lone pairs on the central atom. Some textbook representations for period-3 and heavier central atoms use expanded octets; verify the bonding model your course expects.

  6. 6 Form multiple bonds if the center is short

    When the central atom still lacks an octet, convert lone pairs on adjacent outer atoms into shared bonding pairs. In CO₂, one lone pair from each oxygen forms a second bond, turning O—C—O into O=C=O.

  7. 7 Check formal charges, resonance, and exceptions

    Calculate each atom's formal charge (FC = V − N − ½B), prefer structures that keep formal charges minimal, draw equivalent resonance contributors when double bonds can occupy symmetric positions, and note octet exceptions such as electron-deficient boron or expanded-octet period-3 centers.

Formal Charge Formula

FC = V − N − ½B — valence electrons minus nonbonding electrons minus half the bonding electrons.

Example for one nitrate (NO₃⁻) resonance contributor: nitrogen is 5 − 0 − ½(8) = +1, each single-bonded oxygen is 6 − 6 − ½(2) = −1, and the double-bonded oxygen is 6 − 4 − ½(4) = 0. Adding them gives +1 − 1 − 1 + 0 = −1, matching the ion's overall charge.

Common Lewis Structure Examples

Compare valence electrons, bond types, and lone pairs across textbook molecules, radicals, and polyatomic ions, then open the worked guide or run the formula in the generator.

FormulaValence e⁻BondsTotal lone pairsKey conceptGuide
H2O82 single2Bent molecule with two lone pairs on oxygenView guide
CO2162 double4Linear molecule with two C=O double bondsView guide
NH383 single1Trigonal pyramidal with one lone pair on nitrogenView guide
CH484 single0Tetrahedral with four single C–H bondsView guide
HCN101 single, 1 triple1Linear molecule featuring a C≡N triple bondView guide
BF3243 single9Electron-deficient incomplete octet on boronView guide
SO2182 double5Bent structure with resonance and expanded-octet modelsView guide
O3181 single, 1 double6Bent molecule with two equivalent resonance contributorsView guide
NO2171 single, 1 double5Odd-electron radical with one unpaired electron on nitrogenView guide
NO3−242 single, 1 double8Polyatomic anion with three equivalent resonance contributorsView guide
NH4+84 single0Tetrahedral polyatomic cation with zero formal charge on HGenerate
SO42−322 single, 2 double10Polyatomic anion commonly drawn with an expanded octet on SGenerate

Worked Lewis Structure Guides

Follow step-by-step Lewis structure guides and learn about molecular geometry, polarity, bond angles, and formal charges.

What Is a Lewis Structure?

A Lewis structure, also called a Lewis dot structure or electron-dot diagram, shows how the valence electrons in a molecule or ion are arranged. Shared bonding pairs are drawn as lines between atom symbols—one line for a single bond, two for a double bond, three for a triple bond—while nonbonding lone pairs appear as pairs of dots on the atom that holds them.

Most main-group structures follow the octet rule: atoms tend toward eight valence electrons across bonds and lone pairs, while hydrogen is satisfied with a duet of two. Counting valence electrons, assigning bonds and lone pairs, and checking formal charges lets you compare candidate structures and sets up VSEPR molecular geometry predictions.

Not every species fits a single octet diagram. Electron-deficient molecules like BF₃ stop at six electrons around boron, odd-electron radicals like NO₂ carry an unpaired electron, period-3 centers like SF₆ and PCl₅ are often drawn with expanded octets, and delocalized species like O₃ and NO₃⁻ require equivalent resonance contributors.

Lewis Structures for Molecules and Ions

The same electron-counting rules apply to neutral molecules and charged polyatomic ions. For a neutral molecule, every valence electron comes from its atoms. For an ion, the charge shifts the total: each negative charge adds one electron and each positive charge removes one. Nitrate (NO₃⁻) has 24 valence electrons—5 from nitrogen, 18 from three oxygens, and 1 extra for the 1− charge.

Polyatomic ions are enclosed in square brackets with the overall charge written as a superscript outside, which is how the generator labels results for species such as NH₄⁺, CO₃²⁻, and SO₄²⁻. When multiple bonds can occupy symmetric positions, as in nitrate or carbonate, the generator displays the equivalent resonance contributors that describe the delocalized hybrid.

Supported formulas and limitations

Input typeExamplesHow it is handled
Simple moleculesH₂O, CO₂, NH₃, HCNShows a complete Lewis dot structure and VSEPR summary
Polyatomic ionsNO₃⁻, NH₄⁺, SO₄²⁻Adjusts valence electrons and shows brackets with charge
Octet exceptionsBF₃, SF₆, PCl₅Flags incomplete or expanded octets with formal charges
Odd-electron speciesNO₂, CH₃Marks the unpaired electron on the radical center
Complex multi-center organicsCH₃COOHNot reliably supported from a formula alone
Ionic saltsNaClNot suited to one covalent Lewis structure
Ambiguous connectivityStructural isomersCheck which atoms connect in the intended structure

Enter a chemical formula rather than a compound name or reaction equation. For charges, type a trailing sign such as NO3- or NH4+, and use a caret for larger charges such as SO4^2-. Remember that NO2 and NO2- are distinct species: the minus sign adds one valence electron and changes both bonding and geometry.

Frequently Asked Questions

Is this Lewis structure generator free?

Yes. The Lewis structure generator is free to use with no sign-up required. Structures are calculated locally in your browser for supported molecules and polyatomic ions; only a shared result link includes its formula in the URL.

Can the generator draw Lewis dot structures?

Yes. This Lewis dot structure generator renders a complete dot diagram for every result: atom symbols, single, double, and triple bonds, lone pairs drawn as dot pairs, unpaired radical electrons where present, formal charges on each atom, and square brackets with the overall charge for ions.

Can I calculate Lewis structures for ions?

Yes. Type polyatomic ions such as NO3-, NH4+, CO3^2-, or SO4^2-. The generator adds one valence electron per unit of negative charge or removes one per unit of positive charge, displays equivalent resonance forms where they exist, and places the finished ion inside brackets with its overall charge.

How do you calculate total valence electrons?

Add the valence electrons of every atom in the formula, then add one electron per unit of negative charge or subtract one per unit of positive charge. For example, carbonate (CO₃²⁻, typed as CO3^2-) has 4 from carbon, 3 × 6 = 18 from oxygen, and 2 more for the 2− charge, giving 24 valence electrons in total.

Does the calculator show formal charges, lone pairs, and molecular geometry?

Yes. Alongside the dot diagram, the Lewis dot structure calculator lists atom-by-atom formal charges, total and bonding electron counts, lone pairs, the central atom, an octet-rule check, a VSEPR electron and molecular geometry summary with approximate bond angles, and a step-by-step drawing explanation.

Can I download or copy and paste a Lewis dot structure?

Yes. Every result includes one-click Download PNG and Download SVG buttons, clipboard image copying in compatible browsers so you can copy and paste diagrams into documents, plus Copy Steps, Copy Summary, and Copy Result Link.

How do you calculate formal charge in a Lewis structure?

Use FC = V − N − ½B, where V is the atom's neutral valence electron count, N is its nonbonding (lone-pair and unpaired) electrons, and B is the electrons shared in its bonds. The sum of all atomic formal charges always equals the molecule or ion's overall charge.

What structures are supported—and what are the limits?

Single-center covalent molecules, polyatomic ions, odd-electron radicals (such as NO₂), and common octet exceptions (such as BF₃ and SF₆) are supported from their formula. Ionic salts like NaCl, complex multi-center organics like CH₃COOH, and structural isomers whose connectivity cannot be inferred from a formula alone are outside single-formula generation.