Chemistry tutorial · SMILES notation

SMILES Notation: How to Write and Read SMILES

SMILES writes a molecule as one line of text. Atoms are element symbols, bonds are - = #, branches go in parentheses and rings close with matching digits. Hydrogens are added by valence, so ethanol is simply CCO.

  • 7 rules, easy to hard
  • 33 examples checked in PubChem
  • By ChemAI · Reviewed
  • Class 11–12 · AP · IB · BSc

SMILES rules · easy to hard

Seven rules cover almost every SMILES string

Each rule builds on the one before. Every example was checked in PubChem.

  1. Rule 1 · Atoms

    Atoms

    B C N O P S F Cl Br I are written bare; hydrogens are added by valence.

    CCO ethanol

    Cmethane
    Owater
    CCCpropane
  2. Rule 2 · Bonds

    Bonds

    A single bond is implied between neighbours; = is double, # is triple.

    C#C ethyne

    C=Cethene
    O=C=Ocarbon dioxide
    C#Nhydrogen cyanide
  3. Rule 3 · Branches

    Branches

    A branch goes in parentheses right after the atom it hangs from.

    CC(C)C isobutane

    CC(=O)Oacetic acid
    ClC(Cl)Clchloroform
    CCN(CC)CCtriethylamine
  4. Rule 4 · Rings

    Rings

    Break one ring bond; mark both ends with the same digit (%10 above 9).

    C1CCCCC1 cyclohexane

    C1CC1cyclopropane
    C%10CCCCC%10cyclohexane
  5. Rule 5 · Aromatic

    Aromatic rings

    Lower-case atoms are aromatic; an aromatic N–H is written [nH].

    c1ccccc1 benzene

    C1=CC=CC=C1benzene (Kekulé)
    c1ccc2ccccc2c1naphthalene
    c1cc[nH]c1pyrrole
  6. Rule 6 · Charges + isotopes

    Charges and isotopes

    Brackets hold the H count, charge and mass number; a dot separates ions.

    [NH4+] ammonium

    [Na+].[Cl-]sodium chloride
    CC(=O)[O-]acetate ion
    [2H]O[2H]heavy water
  7. Rule 7 · Stereo

    Stereochemistry

    / and \ set double-bond geometry; @ and @@ set a stereocentre.

    C/C=C\C (Z)-but-2-ene

    C/C=C/C(E)-but-2-ene
    C[C@@H](C(=O)O)NL-alanine
    C[C@H](C(=O)O)ND-alanine
  8. Try it

    Draw it back

    Paste any string from this guide into ChemAI’s SMILES converter.

    Open converter

    2D + 3Dstructure
    InChI · InChIKeyMolfile
    Freeno sign-in

Worked example · aspirin

Writing the SMILES of aspirin, step by step

Aspirin is 2-acetyloxybenzoic acid, C9H8O4. Start at one end, walk along the bonds, and the string grows one group at a time.

  1. Start at one end: the acetyl methyl group

    C
  2. Add the ester carbonyl as a branch

    CC(=O)
  3. Add the ester O and open ring bond 1

    CC(=O)OC1
  4. Walk round the benzene ring (Kekulé form)

    CC(=O)OC1=CC=CC=C1
  5. Add the acid on the last ring carbon (ortho)

    CC(=O)OC1=CC=CC=C1C(=O)O
  6. Check the formula and look it up

    C9H8O4 · 180.16 g/mol · PubChem CID 2244

Rule summary

Every SMILES symbol on one table

Keep this open while you write. Examples link to the converter.

SMILES symbols, what they mean and an example of each
SymbolFeatureExample
C N O …Organic-subset atomCCO
[ ]Other atom, charge, isotope, H[Na+]
- = #Single, double, triple bondC#N
( )BranchCC(C)C
1 … %10Ring closureC1CCCCC1
c n o sAromatic atomc1ccccc1
[nH]Aromatic N–Hc1cc[nH]c1
.Not bonded (salts)[Na+].[Cl-]
/ \Double-bond geometryC/C=C\C
@ @@StereocentreN[C@@H](C)C(=O)O

Common mistakes

Four slips that break a SMILES string

  1. Wrong case

    CL vs Cl

    Symbols keep their case: Cl is chlorine, CL is not a symbol. Lower-case c means an aromatic carbon and only works inside an aromatic ring.

    • CCL not a valid symbol
    • CCl chloromethane
  2. Missing [nH]

    c1ccnc1 vs c1cc[nH]c1

    In five-membered aromatic rings, write the H on nitrogen. Some tools guess it, others (RDKit, used by the converter) reject the string.

    • c1ccnc1 tools disagree
    • c1cc[nH]c1 pyrrole
  3. Open rings

    C1CCCCC vs C1CCCCC1

    Every ring digit needs a partner and every ( needs a ). The converter rejects these and says which one is open.

    • C1CCCCC ring 1 never closed
    • C1CCCCC1 cyclohexane
  4. Bracket hydrogens

    [C] vs [CH4]

    Nothing is added inside brackets: [C] is a bare carbon atom with no hydrogens. Write every H, or leave the brackets off.

    • [C] bare carbon atom
    • [CH4] or C methane

FAQ

SMILES questions

What does SMILES stand for?

Simplified Molecular Input Line Entry System. David Weininger introduced it in 1988; today it is maintained as the open OpenSMILES specification.

What is the difference between SMILES and InChI?

SMILES is short and easy to edit, but one molecule has many valid strings. InChI is an IUPAC standard with one string per molecule; its hashed InChIKey is used for searching.

How do I convert SMILES to a structure?

Paste the string into a SMILES converter such as ChemAI’s. It draws the 2D structure and a 3D model in your browser, and gives the InChI, InChIKey, Molfile and molecular weight.

What is canonical SMILES?

The single string a program chooses for a molecule, so the same molecule always gives the same text in that program. Different programs use different rules, so canonical SMILES from RDKit and from PubChem may differ.

What is the SMILES for benzene?

c1ccccc1 (aromatic form) or C1=CC=CC=C1 (Kekulé form). Both describe benzene, PubChem CID 241.

Does SMILES include hydrogen atoms?

Usually not. Hydrogens on organic-subset atoms are added from valence. They are written only inside brackets ([NH4+]), for isotopes ([2H]) or when needed for stereochemistry ([C@@H]).

Sources

References and review

  1. Weininger, D. (1988). SMILES, a chemical language and information system. 1.J. Chem. Inf. Comput. Sci. 28, 31–36 · doi:10.1021/ci00057a005 (opens in a new tab)
  2. PubChem compound records (CIDs as listed on this page)pubchem.ncbi.nlm.nih.gov · retrieved 1 Nov 2026 (opens in a new tab)