Logo

MonoCalc

/

SMILES to Molecular Formula Converter

Chemistry
Your structures never leave the browser. Nothing is uploaded or looked up.

Paste a SMILES string above, or pick an example, to see its molecular formula, molecular weight, exact mass, charge, rings and double bonds, an annotated SMILES that shows every implicit hydrogen, and a 2D drawing.

About This Tool

SMILES to Molecular Formula Converter – Formula, Molecular Weight and Exact Mass from Structure

A SMILES string writes a molecule as one line of text, and this SMILES to molecular formula converter turns that line into a Hill-order formula, molecular weight, monoisotopic mass, charge and degree of unsaturation. It also draws the structure and annotates the SMILES itself, so you can see where every implicit hydrogen came from. Everything runs in your browser. Proprietary structures are never uploaded or looked up.

Atoms, bonds, branches and ring closures

Letters are atoms, = and # are double and triple bonds, parentheses open a branch, and a digit written twice closes a ring. Ethanol is CCO, acetic acid is CC(=O)O and cyclohexane is C1CCCCC1. A dot separates parts that are not bonded, as in a salt.

The implicit hydrogen rule

Atoms written without brackets (B C N O P S F Cl Br I) get as many hydrogens as it takes to reach their next normal valence. In CCO each carbon has four bonds in total, so the methyl carbon gets 3 H, the CH₂ carbon gets 2 H and oxygen gets 1 H: C₂H₆O. The rule has a surprise. In N(=O)=O the nitrogen has a bond-order sum of 4, the next normal valence of nitrogen is 5, and so it receives one hydrogen. The result is HNO₂, not NO₂. The radical has to be written [N](=O)=O.

Lowercase atoms and why pyrrole needs [nH]

Lowercase c, n, o and s mark aromatic atoms. The converter checks that each aromatic ring can be drawn with alternating double bonds before it counts hydrogens. Benzene c1ccccc1 passes, but c1ccnc1 fails: five atoms cannot pair up. In pyrrole the nitrogen carries a hydrogen and no double bond, so it is written [nH], as in c1cc[nH]c1.

Bracket atoms: charges, isotopes and metals

Brackets switch off the implicit hydrogen rule. [NH4+] has exactly four hydrogens, [Na+] has none, and any element outside the organic subset, such as [Pt] or [Cu+2], must be bracketed. Isotopes go in front of the symbol: [2H] is deuterium and [13CH3] is a labelled methyl carbon.

The [13C] pitfall
A labelled ring carbon written [13C]1=CC=CC=C1 has no hydrogen, because bracket atoms get none for free. The tool gives C₆H₅ and warns you. Write [13CH]1=CC=CC=C1 for labelled benzene.

Dots, salts and Hill order

The number of components is the number of connected pieces in the graph, not the number of dots, so C1.C1 is one molecule (ethane). Sodium acetate CC(=O)[O-].[Na+] has two components and an overall formula of C₂H₃NaO₂. Formulas follow Hill order: carbon first, then hydrogen, then the other elements alphabetically. Without carbon, every element is alphabetical, so sodium chloride is ClNa.

Molecular weight, monoisotopic mass and nominal mass

Molecular weight sums standard atomic weights and is the number for weighing and molarity. Monoisotopic mass sums the most abundant isotope of each element and is what a high-resolution mass spectrometer reports. The nominal mass is the integer sum of mass numbers. For a charged structure the tool also gives the ion m/z, with the electron mass included. Boron compounds are a quirk: their monoisotopic mass is above their molecular weight, because ¹¹B is the most abundant isotope and heavier than the average.

Rings plus π bonds versus formula DBE

The degree of unsaturation is shown two ways. The structural value counts rings and π bonds directly, for example DBE 6 = 1 ring + 5 π bonds for aspirin. The formula value uses (2C + 2 + N − H − X) / 2, the same calculation as the Molecular Formula Finder. They agree for neutral organic molecules and differ for ions, radicals and S=O or P=O bonds, and the tool says which reason applies.

A formula is not a structure
Many different SMILES give the same formula. Ethanol CCO and dimethyl ether COC are both C₂H₆O. Use the formula to check your input, not to identify the compound.

Frequently Asked Questions

Is the SMILES to Molecular Formula Converter free?

Yes, SMILES to Molecular Formula Converter is totally free :)

Can I use the SMILES to Molecular Formula Converter offline?

Yes, you can install the webapp as PWA.

Is it safe to use SMILES to Molecular Formula Converter?

Yes, any data related to SMILES to Molecular Formula Converter only stored in your browser (if storage required). You can simply clear browser cache to clear all the stored data. We do not store any data on server.

What is a SMILES string?

SMILES (Simplified Molecular Input Line Entry System) is a line notation that writes a molecule as text. Atoms are letters, bonds are symbols such as = and #, branches sit in parentheses and rings are closed with matching digits, so ethanol is CCO and benzene is c1ccccc1.

How does SMILES handle hydrogen atoms?

Hydrogens are usually left out. An atom written without brackets (B, C, N, O, P, S, F, Cl, Br, I) gets enough implicit hydrogens to reach its next normal valence, so CCO is C2H6O. An atom inside brackets gets exactly the hydrogens written there and no others, so [CH4] has four and [C] has none.

What do lowercase letters such as c and n mean in SMILES?

Lowercase b, c, n, o, p and s mark aromatic atoms. The tool checks that each aromatic ring can be drawn with alternating double bonds (a Kekulé structure) before it counts hydrogens, which is why benzene c1ccccc1 and C1=CC=CC=C1 both give C6H6.

Why does c1ccnc1 fail when c1cc[nH]c1 works?

A five-membered aromatic ring with five plain atoms has an odd number of atoms that need a double bond, so no alternating pattern exists. In pyrrole one nitrogen donates its lone pair and carries a hydrogen, which has to be written as [nH]. With it, the ring becomes C4H5N.

What is the difference between molecular weight and monoisotopic mass?

Molecular weight sums the standard atomic weights, which average over natural isotope mixtures, and is used for weighing and molarity. Monoisotopic mass sums the mass of the most abundant isotope of each element and is what a high-resolution mass spectrometer measures.

Is my structure sent to a server?

No. The SMILES is parsed, the formula and masses are calculated and the 2D picture is drawn entirely in your browser. Nothing is uploaded, looked up in a database or logged, so proprietary structures stay on your computer.