Structures from a Name

Type a compound name, a formula, or a whole equation. See each molecule drawn with its bonds, in colour.

Examples: aspirin, caffeine, C6H12O6, or an equation like H2 + O2 -> H2O. A compound name is looked up in PubChem, a public chemistry database. Six common molecules are built into this page, so they work with no connection.

Built in, works offline

Results

No structure yet. Type a name above and tap “Show structure”.

Type a compound name, then tap Show structure.

— compound ยท Show a structure to see its formula and atom count here.

How it works

Every molecule is a set of atoms joined by bonds, and this tool draws that set for you. Type a name such as aspirin and the tool looks it up: six everyday molecules (aspirin, caffeine, paracetamol, glucose, ethanol and water) are built into the page, so they draw even with no internet, and anything else is fetched from PubChem, the free public chemistry database, by name or by formula. You can also type a whole equation, such as H2 + O2 -> H2O, and you get one drawing for each compound in it.

Worked example — aspirin. Aspirin’s formula is C9H8O4: 9 carbon atoms, 8 hydrogen atoms and 4 oxygen atoms, joined by 21 bonds. On the drawing, look for the six-carbon benzene ring in the middle (the ring with alternating double bonds, drawn in red), the –COOH group on one side and the ester group (–O–CO–CH3) on the other. Each atom is coloured by element — carbon dark grey, oxygen red, hydrogen light grey — and the panel under the drawing counts the atoms, the single, double and aromatic bonds, and the valency of each element, so you can check that every carbon makes four bonds and every oxygen makes two.

Try comparing two molecules: draw ethanol (C2H6O, 9 atoms, all single bonds) and then caffeine (C8H10N4O2, 24 atoms, with two fused rings and four nitrogens). The bigger, ring-shaped molecule is the one with more atoms and more double bonds — and that is exactly what the counts under each drawing show. If a name is not found, check the spelling or try the molecular formula instead.

How was this calculated?
Each atom is placed using the molecule’s 2D coordinates from its PubChem record (the six built-in molecules carry their PubChem coordinates on the page). Bonds are drawn between the atoms the record says are joined: single bonds grey, double bonds red, triple bonds blue, aromatic bonds dashed red. The atom count, bond count and valency are counted straight from that atom-and-bond list.

Structure data: PubChem (public database). Colours: carbon dark grey, oxygen red, nitrogen blue, hydrogen light grey, sulphur yellow, phosphorus orange, halogens green or purple.

For learning only. Not for patient care decisions. Always check with a qualified professional and the product label.