MolDraw › Chemistry tools › SMILES to Image Converter

SMILES to Image Converter (PNG and SVG)

In short: Paste one or more SMILES and download clean 2D structure images as SVG or PNG, one per molecule or as a labelled grid. It is free, works in your web browser and needs no download.

Black bonds, element-coloured heteroatoms and a fixed bond length give figures that look the same across a paper or slide deck. Set the line width, background and PNG scale, and add atom numbers when you need them.

Style
Grid (two or more SMILES)

Ready.

How the image is made

Your SMILES is read and given 2D coordinates by OpenChemLib, the same open-source engine MolDraw's other structure tools use. The structure is then drawn by MolDraw's own renderer: skeletal formula, carbon atoms as line ends, heteroatoms as element symbols with their hydrogens (OH, NH₂), charges, wedge and hash bonds for stereocentres written with @ or @@, and E/Z double bonds drawn as written.

The bond length is fixed in pixels, so every molecule you export at the same setting has the same scale. That is what journals ask for in a figure with several structures. The image is cropped close to the molecule.

OptionWhat it doesTypical choice
Bond lengthLength of one bond in the SVG (and in the PNG at 1×)30–40 px for slides; ACS style is 14.4 pt
Line widthMultiplies the bond line thicknessNormal; Bold for posters
ColoursElement colours (O red, N blue, S yellow, F and Cl green, Br brown) or all blackAll black for most journals
BackgroundTransparent lets the slide or page colour show throughWhite for Word documents
Aromatic ringsAlternating double bonds (Kekulé) or a circle in the ringKekulé
PNG scale1× is the SVG size; 4× gives four times as many pixels per side3× or 4× for print

How to convert SMILES to PNG or SVG

  1. Paste one SMILES per line. Add a name after a space if you want it as the label, e.g. CCO ethanol. You can also open a .smi or .txt file.
  2. Pick the bond length, line width, colours, background and aromatic style. Tick Atom numbers for NMR or reaction figures.
  3. Press Draw structures. Lines with errors are listed with the reason and the character position.
  4. Press Download SVG or Download PNG. With several SMILES you also get one grid image, and each structure has its own SVG and PNG buttons.

Limitations

Need to edit the drawing? MolDraw is a free online chemical structure editor. Paste the SMILES there to move atoms, add arrows and export.

Open MolDraw editor

Frequently asked questions

How do I convert a SMILES string to an image?

Paste the SMILES, press Draw structures, then Download PNG or Download SVG. The 2D layout and drawing run in your browser, so nothing is uploaded.

Should I use PNG or SVG?

Use SVG for papers, posters and slides: it is a vector file, stays sharp at any size and can be edited in Inkscape or Illustrator. Use PNG for web pages, chat and documents that do not accept SVG. Pick 3× or 4× scale for print.

Can I make one image of many molecules?

Yes. Paste up to 200 SMILES, one per line, with an optional name after each. The tool draws a grid with the number of columns you choose, the same bond length in every cell and the names as labels.

What do the atom numbers mean?

They follow the order of the atoms in your SMILES, starting at 1. Implicit hydrogens are not numbered. This is handy for NMR assignments and for matching atoms between programs.

Why is the layout different from PubChem or ChemDraw?

Each program has its own 2D layout method. This tool uses OpenChemLib for coordinates. For a hand-tuned figure, open the structure in the MolDraw editor and move atoms before exporting.

Last updated: