🕸️SMILES to Structure - Draw Molecules and Get Formula, Mass & Functional Groups
SMILES (Simplified Molecular Input Line Entry System) encodes a molecule as one line of text: uppercase letters are aliphatic atoms, lowercase letters aromatic atoms, = and # mark double and triple bonds, parentheses open branches and paired digits close rings. Aspirin, for example, is CC(=O)Oc1ccccc1C(=O)O. After filling in implicit hydrogens from default valences, this tool reports C₉H₈O₄, a molar mass of 180.16 g/mol, a monoisotopic mass of 180.0423 u and a degree of unsaturation DBE = 1 + 9 − 8/2 = 6 (four for the benzene ring, one for each C=O), and it recognises the carboxylic acid, ester and benzene ring. The parser handles bracket atoms (isotopes like [13C], charges like [NH4+], explicit H, @/@@ chirality), the bond symbols - = # : / \, two-digit %nn ring closures and dot-separated salts or mixtures. The 2D drawing comes from a self-written layout: rings as regular polygons, fused rings sharing edges, chains as 120° zig-zags and an overlap clean-up, with aromatic rings shown as Kekulé bonds or inner circles. You also get SSSR ring count, heavy atoms, Lipinski H-bond donors and acceptors, rotatable bonds and a check of the molecular-weight, HBD and HBA rules. Everything runs locally in your browser, with about 30 presets such as caffeine, ibuprofen, glucose, cholesterol and penicillin G.
Free · No sign-up · Runs in your browserLast updated:
How to use SMILES Molecule Viewer
- 1Type or paste a SMILES string, or pick a common molecule such as aspirin, caffeine or cholesterol
- 2Inspect the 2D skeletal structure; switch aromatic style and toggle carbon labels, atom numbers and stereocentre marks
- 3Read the formula, masses, unsaturation, functional groups and Lipinski check, then export SVG/PNG or copy the formula
FAQ
- How do I write a SMILES string?
- Write atoms as element symbols. Common organic atoms (B, C, N, O, P, S, F, Cl, Br, I) can be written bare; anything else, or any atom with a charge or isotope, goes in brackets such as [Na+], [13C] or [nH]. Neighbouring atoms are single-bonded by default, = is a double bond and # a triple bond. Parentheses make branches, e.g. isopropanol CC(O)C. A digit used twice joins those two atoms into a ring, e.g. cyclohexane C1CCCCC1. Lowercase letters are aromatic atoms, e.g. benzene c1ccccc1, and a dot separates unconnected parts, e.g. sodium acetate CC(=O)[O-].[Na+].
- How are implicit hydrogens calculated?
- Atoms outside brackets get hydrogens up to the lowest default valence that fits their bonds: C 4, N 3 or 5, O 2, S 2, 4 or 6, P 3 or 5, B 3 and halogens 1. In CCO the carbons get 3 and 2 hydrogens and the oxygen 1, giving C₂H₆O. Aromatic atoms use one valence for the π system, so pyridine's n has no H while pyrrole's NH must be written [nH]. Bracket atoms carry only the hydrogens written inside the brackets.
- What does the degree of unsaturation tell me?
- The degree of unsaturation (DBE, double-bond equivalents) equals the number of rings plus π bonds: DBE = 1 + Σ nᵢ(vᵢ − 2)/2, which for CₓHᵧNₙOₘ is x − y/2 + n/2 + 1. A benzene ring contributes 4 (one ring plus three C=C), a carbonyl 1 and a triple bond 2. C₉H₈O₄ has DBE 6, matching aspirin's benzene ring and two C=O groups.
- Why do some structures look distorted?
- The layout is a simplified algorithm written for this tool: polygon rings, fused rings unfolded along shared edges, zig-zag chains and an overlap clean-up by mirroring and small rotations. It works well for chains, single rings and fused systems such as naphthalene, steroids and indoles, but heavily bridged or macrocyclic molecules like adamantane or morphine can come out distorted or overlapping. Only the drawing is affected; formula, masses and functional groups are computed exactly from the molecular graph. Wedge bonds are not drawn and @/@@ are marked without assigning R/S.