Logo

MonoCalc

/

Lewis Structure Generator

Chemistry
e.g. CO2, NH3, H2O, NO3, Ca(OH)2, C2H4
0 = neutral; −1 for NO₃⁻

About This Tool

⚛️ Lewis Structure Generator – Visualise Electron Dot Diagrams

A Lewis structure (also called a Lewis dot diagram or electron-dot structure) is a two-dimensional representation of a molecule or ion that shows every valence electron — both bonding pairs (shared between two atoms) and lone pairs (non-bonding electrons on a single atom). Proposed by Gilbert N. Lewis in 1916, these diagrams remain the most widely taught first-step tool for predicting molecular geometry, polarity, and reactivity.

What Are Valence Electrons?

Only the outermost electrons (valence electrons) participate in bonding. The number of valence electrons an atom contributes equals its group number on the periodic table — carbon (Group 14) contributes 4, oxygen (Group 16) contributes 6, and so on. For ions, you add one electron per unit of negative charge and remove one per unit of positive charge.

Period / Group1 (H, Li, Na…)2 (Be, Mg…)13 (B, Al…)14 (C, Si…)15 (N, P…)16 (O, S…)17 (F, Cl…)18 (Ne, Ar…)
Valence e⁻12345678

The Octet Rule

Most main-group elements achieve maximum stability when they are surrounded by 8 valence electrons — the same configuration as the nearest noble gas. Hydrogen is the exception: it needs only 2 electrons (duet rule) to mimic helium. Atoms share electrons through covalent bonds to satisfy this rule.

How to Draw a Lewis Structure — 8-Step Method

1

Count total valence electrons

Add up valence electrons from all atoms. For ions: subtract 1 e⁻ per +1 charge; add 1 e⁻ per −1 charge.

2

Identify the central atom

The central atom is typically the one with the lowest electronegativity (least tendency to attract electrons). Hydrogen is NEVER central.

3

Place single bonds

Connect the central atom to every terminal atom with a single bond (2 electrons each). This forms the skeleton.

4

Distribute remaining electrons to terminal atoms

Assign lone pairs to terminal atoms first, giving each (except H) enough electrons to complete its octet.

5

Assign leftover electrons to the central atom

Any electrons still unused go to the central atom as lone pairs.

6

Check the central atom's octet

If the central atom still has fewer than 8 electrons, convert lone pairs on terminal atoms into double or triple bonds.

7

Calculate formal charges

FC = Valence electrons − Non-bonding electrons − (Bonding electrons ÷ 2). The best structure minimises all formal charges.

8

Draw resonance structures if needed

If electrons can be delocalised (moved without changing atomic positions), draw all resonance contributors.

Bond Types and Bond Order

A single bond (—) consists of 1 shared electron pair (2 electrons). A double bond (=) consists of 2 shared pairs (4 electrons), and a triple bond (≡) consists of 3 shared pairs (6 electrons). Higher bond order means a shorter, stronger bond. For example, the C≡N bond in HCN is much shorter and stronger than the C—N bond in methylamine.

Bond TypeSymbolElectron PairsExampleBond Strength
Single1 pair (2 e⁻)H—ClWeakest
Double=2 pairs (4 e⁻):O=C=O:Intermediate
Triple3 pairs (6 e⁻):N≡N:Strongest

Formal Charge vs. Oxidation State

Formal charge assumes electrons in bonds are split equally between the two atoms. The formula is:

FC = Valence electrons − Non-bonding electrons − (Bonding electrons ÷ 2)

Oxidation state assumes the more electronegative atom gets all shared electrons. Both are useful bookkeeping tools, but they give different numbers for the same molecule. The ideal Lewis structure is the one where all formal charges are zero or minimised.

Exceptions to the Octet Rule

Three Common Exceptions
Not all elements obey the octet rule: (1) Electron-deficient — B and Be often form stable compounds with only 6 or 4 electrons (e.g. BF₃); (2) Odd-electron species — radicals like NO₂ have an odd number of valence electrons; (3) Expanded octets — Period 3+ elements (P, S, Cl, Xe) can hold 10–12 electrons using d-orbitals (e.g. PCl₅, SF₆).

Resonance Structures

When two or more equivalent Lewis structures can be drawn by moving only electrons (not atoms), the molecule is said to have resonance. Common examples include ozone (O₃), nitrate (NO₃⁻), carbonate (CO₃²⁻), and sulfate (SO₄²⁻). The actual electron distribution is a resonance hybrid — an average of all contributors. Resonance structures are shown with a double-headed arrow (↔) between them, and all equivalent bonds in the hybrid have the same bond length and order.

Molecular Geometry from Lewis Structures

Once you have a Lewis structure, you can predict the 3-D shape of the molecule using VSEPR theory (Valence Shell Electron Pair Repulsion). Both bonding and lone pairs repel each other and arrange themselves as far apart as possible. Lone pairs exert stronger repulsion than bonding pairs, which is why water (2 bonds + 2 lone pairs) has a bent shape at 104.5° rather than the ideal tetrahedral 109.5°.

Bonding PairsLone Pairs on CentralGeometryBond AngleExample
20Linear180°CO₂, BeCl₂
30Trigonal planar120°BF₃, SO₃
40Tetrahedral109.5°CH₄, CCl₄
31Trigonal pyramidal107°NH₃, PCl₃
22Bent (V-shape)104.5°H₂O, SO₂
50Trigonal bipyramidal90°/120°PCl₅
60Octahedral90°SF₆

Polarity and Lewis Structures

A molecule is polar if it has an overall non-zero dipole moment. This depends on two factors: (1) individual bond polarity (from electronegativity difference) and (2) geometry. CO₂ has two polar C=O bonds, but they point in opposite directions and cancel out — making CO₂ nonpolar. H₂O has two polar O—H bonds that do not cancel (bent geometry) — making H₂O highly polar.

Lewis structures are the foundation of all molecular chemistry. Mastering them unlocks the ability to predict reactivity, draw reaction mechanisms, understand spectroscopic data, and apply VSEPR theory to real-world problems from drug design to materials science.

Frequently Asked Questions

Is the Lewis Structure Generator free?

Yes, Lewis Structure Generator is totally free :)

Can I use the Lewis Structure Generator offline?

Yes, you can install the webapp as PWA.

Is it safe to use Lewis Structure Generator?

Yes, any data related to Lewis Structure Generator only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

What is a Lewis structure and why is it important?

A Lewis structure (also called an electron-dot structure) is a diagram that shows all valence electrons in a molecule — both bonding pairs (shared between atoms) and lone pairs (non-bonding, on a single atom). Lewis structures are fundamental to understanding molecular geometry, polarity, reactivity, and bond types in chemistry.

How does this generator determine the Lewis structure?

The tool follows the standard 8-step algorithm: (1) count total valence electrons, adjusting for charge; (2) identify the central atom (lowest electronegativity, not H); (3) place single bonds between all atoms; (4) distribute remaining electrons as lone pairs to terminal atoms first; (5) give leftover electrons to the central atom; (6) convert lone pairs to double or triple bonds if the central atom still needs an octet; (7) calculate formal charges on each atom. For ~40 common molecules, a pre-built lookup table provides verified structures.

How do I enter a polyatomic ion like NO₃⁻ or SO₄²⁻?

Type the molecular formula in the Formula field (e.g. NO3 or SO4) and set the Net Charge field to the ion's charge (−1 for nitrate, −2 for sulfate). The tool will automatically add or subtract electrons from the total valence electron count and display the correct structure.

What does formal charge mean in a Lewis structure?

Formal charge (FC) is a hypothetical charge assigned to an atom assuming all electrons in bonds are shared equally: FC = Valence electrons − Non-bonding electrons − (Bonding electrons ÷ 2). The best Lewis structure minimises formal charges and places any negative formal charge on the more electronegative atom. Formal charge is not the same as oxidation state.

Why do some molecules like BF₃ or PCl₅ violate the octet rule?

The octet rule has three well-known exceptions: (1) Electron-deficient molecules — B and Be often have fewer than 8 electrons (e.g. BF₃ has only 6 on B); (2) Odd-electron species — molecules with an odd number of valence electrons (e.g. NO₂, 17 VE) have one unpaired electron; (3) Expanded octets — elements in Period 3 and below (P, S, Cl, Xe, etc.) can use d-orbitals to accommodate 10 or 12 electrons (e.g. PCl₅, SF₆).

What is resonance and which molecules have it?

Resonance occurs when a single Lewis structure cannot accurately represent the electron distribution and two or more equally valid structures must be drawn. Common examples include NO₃⁻, CO₃²⁻, SO₂, O₃, and benzene. The true structure is a hybrid (average) of all contributing resonance forms, giving all equivalent bonds the same bond order. The generator marks resonance molecules with a special indicator and shows the contributing forms.