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.

Quick answer: SMILES lists atoms as symbols (hydrogens are implicit), uses = 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

RuleHow it worksExamples
AtomsOrganic-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
BracketsAny other element, charge, isotope or explicit H goes in square brackets, and then no hydrogens are added automatically.[Na+], [NH4+], [O-], [13CH4], [Fe+2]
BondsSingle 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-]
BranchesA branch goes in parentheses after the atom it is attached to. Branches can be nested.CC(C)C isobutane, CC(=O)O acetic acid
RingsBreak 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
AromaticityLower-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

  1. Draw the skeleton without hydrogens: (CH₃)₂CH–CH₂–OH.
  2. Pick a starting atom at one end, e.g. a methyl carbon: C.
  3. Walk to its neighbour, the CH carbon: CC. It has a second methyl, written as a branch: CC(C).
  4. Continue along the main chain to the CH₂ and then the O: CC(C)CO.
  5. Hydrogens are implicit, so CC(C)CO is 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.

MoleculeSMILESFormula
Acetic acidCC(=O)O C2H4O2
AcetoneCC(=O)C C3H6O
Adrenaline (epinephrine)CNC[C@@H](C1=CC(=C(C=C1)O)O)O C9H13NO3
AmmoniaN H3N
AspirinCC(=O)OC1=CC=CC=C1C(=O)O C9H8O4
BenzeneC1=CC=CC=C1 C6H6
CaffeineCN1C=NC2=C1C(=O)N(C(=O)N2C)C C8H10N4O2
Carbon dioxideC(=O)=O CO2
CholesterolC[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 acidC(C(=O)O)C(CC(=O)O)(C(=O)O)O C6H8O7
CyclohexaneC1CCCCC1 C6H12
EthanolCCO C2H6O
EtheneC=C C2H4
EthyneC#C C2H2
GlucoseC([C@@H]1[C@H]([C@@H]([C@H](C(O1)O)O)O)O)O C6H12O6
GlycineC(C(=O)O)N C2H5NO2
IbuprofenCC(C)Cc1ccc(cc1)C(C)C(=O)O C13H18O2
L-AlanineC[C@@H](C(=O)O)N C3H7NO2
MethaneC CH4
MethanolCO CH4O
Naphthalenec1ccc2ccccc2c1 C10H8
ParacetamolCC(=O)Nc1ccc(O)cc1 C8H9NO2
PhenolOc1ccccc1 C6H6O
Pyridinec1ccncc1 C5H5N
SerotoninC1=CC2=C(C=C1O)C(=CN2)CCN C10H12N2O
Sodium chloride[Na+].[Cl-] ClNa
SucroseC([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
TolueneCc1ccccc1 C7H8
VanillinCOC1=C(C=CC(=C1)C=O)O C8H8O3
WaterO H2O

Common SMILES mistakes

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 editor

Frequently 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.

Related chemistry tools