Imaging Services

PubChem has developed many imaging tools. These tools are used on PubChem web pages, and can be used as standalone tools. This document summarizes the current major used imaging services, including PubChem Sketcher, 2D and 3D static depictions, MS image generator, NFPA image generator, and GHS pictograms.

PubChem Sketcher

PubChem sketcher is designed as a structure drawing tool to serve the PubChem structure search. To launch the sketcher, click the “Draw Structure” icon on the PubChem homepage.



In addition, PubChem sketcher can be used as a standalone drawing interface to allow users to export the structure in various formats, such as an image (png, gif, jpg..), SDF, SMILES, InChI, etc.


Static 2D structure depiction (png)

PubChem provides a fast image retrieving tool to display chemical images with a given CID (default dimension 100x100). The URL is:


To show an image on a web page, use code:



The tool also provides an additional option to display a larger (300x300) depiction:


A pug-rest service also provides similar functionalities to generate 2D structure depictions:






For more information about the pug-rest image service, please visit:


Static 3D structure image (png)

PubChem provides a 3d structure retrieving tool to display 3D conformer with a given CID (default dimension 300x300). The URL is:


To show a conformer image on a web page, use code



The tool also provides an additional option to display a smaller (100x100) conformer image:


Conformer 3D images can also be generated by pug-rest service:





For more information about the pug-rest image service, please visit:


Mass spectrometry image (svg)

The ms.cgi is designed to display MS images with mass:intensity pair input or a list of mass values.


E.g. on the page:


With the given MS data mass->intensity pairs:


106.121178 -> 100
192.116196 -> 88.9
174.121155 -> 59.2
160.111221 -> 50.5
350.190521 -> 23.7


The image will be shown with URL:,192.116196:88.9,174.121155:59.2,160.111221:50.5,350.190521:23.7


The cgi has an option “angle=xx” to display the fragment mass value in certain direction. The default mass values are displayed at -25 degrees (clockwise). To display the mass value as -60 degrees, use:,192.116196:88.9,174.121155:59.2,160.111221:50.5,350.190521:23.7


By default, the cgi shows all ms peak labels. The option "pl=f" turns off the ms label display.



NFPA image (svg)

The NFPA image cgi is created to show NFPA704 diamond image dynamically in SVG format with a simple input, e.g. on page:


The image is displayed using URL:


The input parameter “code” takes rating (0-4) for health (blue), fire (red), instability (yellow) codes, and the specific notation letter (white: W, OX, SA). The non-standard symbols are not supported in the current version.  


For more information about the NFPA codes, please visit NFPA website at


In addition, a quick reference card can be found at



Static GHS pictograms (svg, gif)

PubChem provides the static GHS pictograms in both SVG and GIF format. An example of retrieving URL is:



or GIF:


For more information about the GHS pictograms, visit


Was this information helpful?


National Library of Medicine
8600 Rockville Pike
Bethesda, MD 20894


PubChem Help
HHS Vulnerability Disclosure


The page cannot be found

The page you are looking for might have been removed, had its name changed, or is temporarily unavailable. Please make sure you spelled the page name correctly or use the search box.