SMILES to Molecular Formula Converter
In short: Paste a SMILES string and get molecular formula, molecular weight, IUPAC name, and PubChem CID when available. It is free, works in your web browser and needs no download.
Paste a SMILES string to get the molecular formula and supporting PubChem metadata.
About SMILES and Molecular Formula
SMILES describes molecular connectivity as a compact text string. A molecular formula summarizes the atom counts in the molecule, such as C9H8O4 for aspirin.
- Use formula output for reports, exact mass checks, and composition calculations.
- Use the molecular weight tool when you need g/mol from the formula.
How the formula is worked out
SMILES lists heavy atoms explicitly, but most hydrogens are implicit: each atom gets enough hydrogens to fill its normal valence. To build the formula, the tool counts every explicit atom, adds the implicit hydrogens, and writes the result in Hill order: carbon first, hydrogen second, then all other elements alphabetically.
Worked example
For ethyl acetate, CCOC(=O)C:
- Carbons: 4. Oxygens: 2.
- Hydrogens: CH3 (3) + CH2 (2) + the ester carbon (0) + CH3 (3) = 8.
- Formula: C4H8O2.
Things to watch
- Charges:
CC(=O)[O-](acetate) gives C2H3O2−, one hydrogen fewer than acetic acid. - Bracket atoms: atoms in square brackets get only the hydrogens written, so
[CH2]is a carbon with exactly two. - Salts: dotted SMILES such as
[Na+].[Cl-]combine all components.
Need mass too? Use SMILES to Molecular Weight or the Exact Mass Calculator.
Last updated: