Lewis structure generator for ionic compounds

Lewis Structures for Ions and Ionic Compounds

Charged species require an adjusted electron count and bracket notation. Polyatomic ions have internal covalent bonds, while simple ionic compounds are usually represented as separate ions rather than one shared-electron molecular structure.

Adjust the valence-electron count for charge

Add one electron for every negative charge. Subtract one electron for every positive charge.

For NO3−, add one electron to the neutral atom total. For NH4+, subtract one. This adjustment is made once for the entire species, not once per atom.

How to draw a polyatomic ion

  1. Count electrons including the charge.
    Write the adjusted total before placing any bonds.
  2. Choose the covalent skeleton.
    Identify the central atom and terminal atoms just as you would for a neutral molecule.
  3. Complete octets and form multiple bonds if required.
    Use the same electron-accounting rules as for neutral molecules.
  4. Calculate formal charges.
    The sum must equal the ion's overall charge.
  5. Draw resonance contributors when needed.
    Nitrate and carbonate require equivalent electron placements.
  6. Add brackets and the overall charge.
    Enclose the entire structure, then write the charge outside the upper-right bracket.

Example: ammonium, NH4+

Nitrogen contributes 5, four hydrogens contribute 4 and the +1 charge removes one, leaving 8 electrons. Four N–H bonds use all 8. Nitrogen has no lone pair, the ion is tetrahedral and the bracketed structure carries +1 overall.

Open NH4+ in the generator →

Example: nitrate, NO3−

Nitrate has 24 valence electrons. Its major contributors contain one N=O bond and two N–O single bonds. The double bond can occupy any of the three N–O positions, so the measured bonds are equivalent in the resonance hybrid.

Open NO3− in the generator →

How simple ionic compounds differ

A formula such as NaCl describes an extended ionic solid, not a discrete Na–Cl molecule with one ordinary covalent bond. A basic Lewis representation shows electron transfer and separate ions:

[Na]⁺ [:Cl:]⁻
Sodium loses one electron; chloride gains one and completes an octet.

For compounds such as CaCl2, show Ca2+ and two separate Cl− ions. Do not imply that the solid consists of isolated triatomic molecules.

Polyatomic ions inside ionic compounds

In ammonium nitrate, NH4NO3, draw the covalent Lewis structure of NH4+ and the resonance structures of NO3− separately, then show the electrostatic pairing of the two charged ions. The covalent bonds remain inside each polyatomic ion.

Common mistakes

  • Subtracting electrons for a negative ion or adding them for a positive ion.
  • Forgetting brackets and the overall charge.
  • Making formal charges add to zero when the species is charged.
  • Drawing a single covalent line between simple monatomic ions.
  • Moving atoms instead of electrons when drawing resonance in nitrate, carbonate or sulfate.
  • Assuming a formula unit is always a discrete molecule.

Supported charged examples

  • NH4+
  • OH−
  • CN−
  • NO3−
  • CO3²−
  • SO4²−
  • PO4³−
  • ClO−
  • ClO3−
  • ClO4−
  • MnO4−
  • CH3COO−
  • HCO3−

Local key formatting varies. Compact formulas such as NH4+ and NO3- are the best starting point.

Last reviewed: July 15, 2026.