MolDraw › Chemistry tools › SMILES Notation Guide
SMILES Notation Guide
SMILES writes a molecule as a line of text. This guide covers every rule you need, with worked examples and a table of SMILES codes for common molecules. A live validator checks your SMILES, gives its formula and draws it.
= and # for double and triple bonds, ( ) for branches, matching digits for rings and lower case for aromatic atoms. Ethanol is CCO and benzene is c1ccccc1.What is SMILES?
SMILES (Simplified Molecular Input Line Entry System) is a way of writing a chemical structure as a single line of ASCII text. David Weininger introduced it in 1988 (J. Chem. Inf. Comput. Sci. 28, 31–36). Today the OpenSMILES specification documents it. A SMILES string lists atoms in the order you would meet them walking through the molecule, with symbols for bonds, branches and ring closures. Ethanol is CCO, benzene is c1ccccc1 and caffeine is Cn1cnc2c1c(=O)n(C)c(=O)n2C.
Because it is plain text, SMILES is the standard way to store, search and exchange molecules in databases (PubChem, ChEMBL), spreadsheets, code and machine-learning datasets. It can be typed or copied into almost any chemistry program, including MolDraw.
SMILES rules in 8 steps
| Rule | How it works | Examples |
|---|---|---|
| Atoms | Organic-subset atoms B, C, N, O, P, S, F, Cl, Br, I are written as bare symbols. Hydrogens are added automatically to fill normal valence. | C methane, O water, N ammonia, CCl chloromethane |
| Brackets | Any other element, charge, isotope or explicit H goes in square brackets, and then no hydrogens are added automatically. | [Na+], [NH4+], [O-], [13CH4], [Fe+2] |
| Bonds | Single bonds are implied between neighbours. Write = for double, # for triple, and . to separate pieces that are not bonded. | CC ethane, C=C ethene, C#N HCN, [Na+].[Cl-] |
| Branches | A branch goes in parentheses after the atom it is attached to. Branches can be nested. | CC(C)C isobutane, CC(=O)O acetic acid |
| Rings | Break one bond of the ring and label both ends with the same digit. Digits can be reused once a ring is closed, and %10 and up are used for very large ring counts. | C1CCCCC1 cyclohexane, C1CC1 cyclopropane |
| Aromaticity | Lower-case atoms are aromatic, and the bonds between them are aromatic. Kekulé form with alternating = bonds is also valid. | c1ccccc1 = C1=CC=CC=C1 benzene; c1cc[nH]c1 pyrrole |
| Stereo (cis/trans) | / and \ show the direction of bonds on each side of a double bond. | F/C=C/F trans, F/C=C\F cis-1,2-difluoroethene |
| Stereo (chirality) | @ (anticlockwise) or @@ (clockwise) inside brackets give the order of neighbours seen from the first one. | C[C@@H](C(=O)O)N L-alanine |
Writing a SMILES by hand: isobutanol
- Draw the skeleton without hydrogens: (CH₃)₂CH–CH₂–OH.
- Pick a starting atom at one end, e.g. a methyl carbon:
C. - Walk to its neighbour, the CH carbon:
CC. It has a second methyl, written as a branch:CC(C). - Continue along the main chain to the CH₂ and then the O:
CC(C)CO. - Hydrogens are implicit, so
CC(C)COis complete: C₄H₁₀O.
Many SMILES can describe the same molecule (OCC(C)C is also isobutanol). A canonical SMILES is the single standard version a program produces, so identical molecules give identical strings. An isomeric SMILES also keeps stereochemistry and isotopes.
SMILES codes of common molecules
SMILES from PubChem, with formulas checked by this page's parser. Tap Try to load one into the validator.
| Molecule | SMILES | Formula |
|---|---|---|
| Acetic acid | CC(=O)O | C2H4O2 |
| Acetone | CC(=O)C | C3H6O |
| Adrenaline (epinephrine) | CNC[C@@H](C1=CC(=C(C=C1)O)O)O | C9H13NO3 |
| Ammonia | N | H3N |
| Aspirin | CC(=O)OC1=CC=CC=C1C(=O)O | C9H8O4 |
| Benzene | C1=CC=CC=C1 | C6H6 |
| Caffeine | CN1C=NC2=C1C(=O)N(C(=O)N2C)C | C8H10N4O2 |
| Carbon dioxide | C(=O)=O | CO2 |
| Cholesterol | C[C@H](CCCC(C)C)[C@H]1CC[C@@H]2[C@@]1(CC[C@H]3[C@H]2CC=C4[C@@]3(CC[C@@H](C4)O)C)C | C27H46O |
| Citric acid | C(C(=O)O)C(CC(=O)O)(C(=O)O)O | C6H8O7 |
| Cyclohexane | C1CCCCC1 | C6H12 |
| Ethanol | CCO | C2H6O |
| Ethene | C=C | C2H4 |
| Ethyne | C#C | C2H2 |
| Glucose | C([C@@H]1[C@H]([C@@H]([C@H](C(O1)O)O)O)O)O | C6H12O6 |
| Glycine | C(C(=O)O)N | C2H5NO2 |
| Ibuprofen | CC(C)Cc1ccc(cc1)C(C)C(=O)O | C13H18O2 |
| L-Alanine | C[C@@H](C(=O)O)N | C3H7NO2 |
| Methane | C | CH4 |
| Methanol | CO | CH4O |
| Naphthalene | c1ccc2ccccc2c1 | C10H8 |
| Paracetamol | CC(=O)Nc1ccc(O)cc1 | C8H9NO2 |
| Phenol | Oc1ccccc1 | C6H6O |
| Pyridine | c1ccncc1 | C5H5N |
| Serotonin | C1=CC2=C(C=C1O)C(=CN2)CCN | C10H12N2O |
| Sodium chloride | [Na+].[Cl-] | ClNa |
| Sucrose | C([C@@H]1[C@H]([C@@H]([C@H]([C@H](O1)O[C@]2([C@H]([C@@H]([C@H](O2)CO)O)O)CO)O)O)O)O | C12H22O11 |
| Toluene | Cc1ccccc1 | C7H8 |
| Vanillin | COC1=C(C=CC(=C1)C=O)O | C8H8O3 |
| Water | O | H2O |
Common SMILES mistakes
- Unclosed rings:
C1CCopens ring 1 but never closes it. - Valence errors:
C(C)(C)(C)(C)Cgives carbon five bonds. - Aromatic N–H: pyrrole is
c1cc[nH]c1, and the bracketed[nH]is required. - Case matters:
Cois cobalt, whileCOis methanol, andScis scandium, not S plus aromatic C. - Charges need brackets: write
[O-], notO-.
Convert SMILES to other formats
MolDraw has free converters for every common direction: SMILES to structure (2D), structure to SMILES, name to SMILES, SMILES to IUPAC name, SMILES to InChI, SMILES to MOL and SMILES to 3D.
Drawing structures for your notes? MolDraw is a free online chemical structure editor for molecules, reactions and lab diagrams.
Open MolDraw editorFrequently asked questions
What does SMILES stand for in chemistry?
Simplified Molecular Input Line Entry System: a line notation that writes a molecule's structure as a short text string, such as CCO for ethanol.
What is the SMILES code for water?
O. Hydrogens are implicit, so a single oxygen means H₂O. The explicit form is [OH2].
How are rings written in SMILES?
Break one ring bond and put the same digit after both atoms: cyclohexane is C1CCCCC1 and benzene is c1ccccc1.
What do lowercase letters mean in SMILES?
Aromatic atoms: c, n, o, s, p (and b). c1ccccc1 is benzene with aromatic bonds.
What is the difference between canonical and isomeric SMILES?
Canonical SMILES is one standardised string per molecule. Isomeric SMILES also encodes stereochemistry (@, @@, /, \) and isotopes. PubChem provides both.
How do I get the SMILES of a molecule?
Draw it and use structure to SMILES, convert a name with name to SMILES, or look it up in PubChem. Then paste it into the validator above to check it.