InChI, InChIKey, SMILES and CAS numbers: what each identifier is for

Which chemical identifier to search, cite and order by

14 min

Esomeprazole beside four identifier rows: InChI layers, the three InChIKey blocks, its atoms in SMILES order and the CAS number digit groups.

TL;DR

  • InChI is the IUPAC standard identifier, calculated from the structure and written in layers (formula, connections, hydrogens, charge, stereo, isotopes). It converts back to the structure.
  • InChIKey is a 27-character SHA-256 hash of the InChI. Its first 14 letters encode the skeleton, so stereoisomers share them. Use it to search the web and match records across databases; it cannot be turned back into a structure.
  • SMILES is the structure as a line of text for software. Canonical SMILES is unique only within one toolkit, and isomeric SMILES keeps stereochemistry and isotopes.
  • A CAS Registry Number is assigned by CAS, carries no structural information and ends in a check digit. Each salt, hydrate and enantiomer gets its own, which makes it the identifier for ordering, safety data and regulation.
  • A PubChem CID is PubChem's accession number for one standardized structure. SketchIQ shows SMILES, InChIKey, CAS and CID for any structure PubChem knows.

Look up esomeprazole and you will find at least three CAS Registry Numbers: 119141-88-7 for the neutral (S)-enantiomer, 161973-10-0 for its magnesium salt and 217087-09-7 for that salt's trihydrate. Omeprazole, the racemic drug whose (S)-enantiomer is esomeprazole, has a fourth, 73590-58-6. PubChem files all four under separate CIDs, and a supplier catalogue or safety data sheet names exactly one of them.[7][9]

The InChIKeys tell the same story differently. Omeprazole and esomeprazole share their first 14 letters, SUBDBMMJDZJVOS, because they have the same atoms and bonds; only the second block, which hashes the stereochemistry, differs. The magnesium salt and the hydrate get entirely new keys. Search with the wrong identifier and a database lookup quietly misses records, or an order arrives as the wrong salt.

Every value on this page comes from that one family of molecules, and you can reproduce them by typing a CAS number, name or InChIKey into SketchIQ, the free chemical structure drawer by ProteinIQ.

Five identifiers for one molecule

Two of these identifiers are calculated from the structure (InChI and SMILES), one is a hash of a calculated identifier (InChIKey), and two are registration numbers handed out by an organization (CAS and PubChem). That split decides almost everything about how you can use them.

IdentifierEsomeprazoleWhere it comes fromConverts back to a structureBest for
InChIInChI=1S/C17H19N3O3S/c1-10-8-18-15(11(2)16(10)23-4)9-24(21)17-19-13-6-5-12(22-3)7-14(13)20-17/h5-8H,9H2,1-4H3,(H,19,20)/t24-/m0/s1Calculated from the structure by the IUPAC InChI softwareYesExchanging structures in one standard form
InChIKeySUBDBMMJDZJVOS-DEOSSOPVSA-NHashed from the InChINoWeb search and matching records across databases
SMILESCOc1ccc2nc(S@@Cc3ncc(C)c(OC)c3C)[nH]c2c1Written from the structure by any cheminformatics toolkitYesInput to software and supporting information files
CAS Registry Number119141-88-7Assigned by CAS when it first indexes the substanceNoOrdering, safety data sheets and regulation
PubChem CID9568614Assigned by PubChem to each new standardized structureNo, only by lookupLinking to PubChem's record
Table 1. Esomeprazole under five identifiers. The SMILES is RDKit's canonical isomeric SMILES. Sources: PubChem and CAS Common Chemistry, accessed November 1, 2026.[9][7]

InChI: a structure written in layers

InChI, the IUPAC International Chemical Identifier, was developed by IUPAC and NIST and released publicly in 2005 so that every defined structure would have one identifier that anyone could calculate for free.[1] The software is open source and maintained by the InChI Trust; the current release, 1.07.5, came out in February 2026.[4]

Before writing anything, InChI normalizes the structure: it disconnects bonds to metals, merges tautomeric hydrogens and numbers the atoms in its own canonical order. The result is written as layers separated by slashes, each adding one kind of information, so a reader (or a program) can stop at the level of detail it cares about.[2]

LayerEsomeprazoleWhat it says
VersionInChI=1SVersion 1, standard InChI
FormulaC17H19N3O3SElemental formula, with dot-separated parts for salts and mixtures
Connections /c1-10-8-18-15(…)20-17Which heavy atoms are bonded to which, without bond orders
Hydrogens /h5-8H,9H2,1-4H3,(H,19,20)Fixed hydrogens on each atom; (H,19,20) is one mobile hydrogen shared by nitrogens 19 and 20
Tetrahedral stereo /t24-Parity of atom 24, the sulfoxide sulfur
Inversion /m0Whether the molecule is the configuration in /t (0) or its mirror image (1)
Stereo type /s1Absolute stereochemistry; 2 is relative and 3 is racemic
Table 2. The layers of esomeprazole's standard InChI. Atom numbers refer to InChI's canonical numbering of the 24 heavy atoms, carbons first. Source: Heller et al. (2015).[2]

Omeprazole's InChI is identical up to the end of the hydrogen layer and then simply stops, because the racemate has no defined stereocentre. (R)-omeprazole carries /t24-/m1/s1: the same parity with the inversion flag flipped. Esomeprazole magnesium adds a charge layer, /q2*-1;+2, for two deprotonated drug anions and one Mg²⁺, and its formula layer becomes 2C17H18N3O3S.Mg.

The mobile hydrogen in the /h layer is where InChI earns its keep. Omeprazole's benzimidazole NH can sit on either ring nitrogen, which is why the same drug is called 5-methoxy in much of the literature and 6-methoxy in PubChem. Written as SMILES, the two tautomers give two different canonical strings; as InChI, they give one.[9]

That normalization is also the trade-off. A standard InChI describes the compound, not the drawing, so it cannot record which tautomer you meant. Non-standard InChI can, with an optional fixed-hydrogen layer, but then two programs only agree if they use the same options. That is why the standard form, flagged by the S after the version number, is the one databases store.[2]

A full InChI is too long and too full of slashes and commas for search engines and database keys. The InChIKey solves that with a fixed 27-character string: two blocks of uppercase letters hashed from the InChI with SHA-256, three flag letters and two hyphens.[3]

The first block, 14 letters, encodes 65 bits of the hash of the main layer: formula, connections and hydrogens. The second block has 8 letters from 37 bits of the hash of the remaining layers (stereo and isotopes), followed by S for standard and A for version 1. The final letter is the protonation flag; N means no protons were added or removed.[3]

SubstanceInChIKeyPubChem CIDCAS RN
Omeprazole (racemate)SUBDBMMJDZJVOS-UHFFFAOYSA-N459473590-58-6
Esomeprazole, (S)SUBDBMMJDZJVOS-DEOSSOPVSA-N9568614119141-88-7
(R)-omeprazoleSUBDBMMJDZJVOS-XMMPIXPASA-N9579578119141-89-8
Esomeprazole magnesiumKWORUUGOSLYAGD-YPPDDXJESA-N9568613161973-10-0
Esomeprazole magnesium trihydrateVEVZQDGATGBLIC-OXLUMUBXSA-N21121303217087-09-7
Table 3. InChIKeys across the omeprazole family. Stereoisomers share the first block; salts and hydrates change both blocks. Sources: PubChem and CAS Common Chemistry, accessed November 1, 2026.[9][7]

The shared first block is the most useful trick in the whole system. Search for SUBDBMMJDZJVOS alone and you find the racemate, both enantiomers and any isotope-labelled version in one query. UHFFFAOY in the second block is what an empty stereo and isotope layer hashes to, so it marks a record with no stereochemistry defined, whether the compound is achiral or the stereo was simply left out.

Salts are the trap. The first block hashes the whole main layer, including the magnesium and the water, so esomeprazole magnesium shares nothing with esomeprazole in its key. A search by the parent's InChIKey will not find a salt form unless the database links parents and salts separately, as PubChem does.

InChIKey collisions

Squeezing every possible structure into 65 bits means two different InChIs can, in principle, hash to the same key. Pletnev and colleagues put numbers on it in 2012. The chance of at least one first-block collision is 1.3% in a database of a billion compounds and 0.014% in one of 100 million. For the second block, half a chance of a collision is reached at about 370,000 stereoisomers or isotopologues of one skeleton.[3]

Collisions have been found, though in molecules built for the purpose. A 2009 report found second-block collisions among the stereoisomers of spongistatin I, whose 26 stereogenic elements allow 67 million of them, and a 2011 report found a first-block collision between a C50 alcohol and a C56 ketone with long branched alkyl chains. Pletnev's own tests on more than 30 billion generated structures matched the theory.[3]

We applied the same birthday-paradox formula to PubChem's 124.9 million compounds and got an expected 0.0002 first-block collisions, about one chance in 5,000, and less than that in practice because stereoisomers share a first block.[8] For real compounds, treat an InChIKey match as a match. For enumerated virtual libraries in the billions, keep the full InChI or SMILES alongside.

The other limit is that a hash only goes one way. An InChIKey cannot be decoded into a structure; you can only look it up in a database where someone has already deposited that structure.

Canonical and isomeric SMILES

SMILES writes the molecule as a path through its atoms, which is why software reads it so easily and why one molecule has many valid strings. The SMILES notation guide covers the grammar; what matters here is how SMILES behaves as an identifier.

PubChem writes esomeprazole as CC1=CN=C(C(=C1OC)C)C[S@](=O)C2=NC3=C(N2)C=C(C=C3)OC, in Kekulé form. RDKit, which SketchIQ uses, writes COc1ccc2nc([S@@](=O)Cc3ncc(C)c(OC)c3C)[nH]c2c1.[9] Both describe the (S)-enantiomer. The @ became @@ because the neighbours of the sulfur are listed in a different order, not because the configuration changed.

Canonical SMILES fixes the atom order within one program, so the same toolkit always writes the same string. Isomeric SMILES additionally keeps stereo marks and isotopes. Drop them, as PubChem's connectivity SMILES does, and omeprazole and esomeprazole collapse into the same string. Tautomers go the other way: the 5-methoxy and 6-methoxy forms of omeprazole get two different canonical SMILES from RDKit.

So SMILES is the right thing to hand to software and the wrong thing to compare across sources. To check whether two SMILES strings from different places are the same compound, re-canonicalize both with one toolkit or compare their InChIKeys.

CAS Registry Numbers

A CAS Registry Number is a registration number, not a description. CAS, a division of the American Chemical Society, has assigned them since 1965, in sequential order, to each new substance its scientists index from the literature, patents and other sources. CAS REGISTRY now holds more than 300 million substances.[5]

Because nothing about the number depends on structure, CAS can register things InChI and SMILES cannot describe: alloys, minerals, polymers, proteins, and substances of unknown or variable composition.[5] It also means you can't calculate a CAS number. Someone has to look it up.

The CAS check digit

A CAS number has up to 10 digits in three groups: 2 to 7 digits, then 2, then a single check digit.[6] To get the check digit, number the other digits from the right starting at 1, multiply each digit by its position and keep the last digit of the sum:

check digit=(∑i=1ni⋅di) mod 10\text{check digit} = \left( \sum_{i=1}^{n} i \cdot d_i \right) \bmod 10

where d1d_1 is the digit just left of the last hyphen. For omeprazole, 73590-58-6, the digits read from the right are 8, 5, 0, 9, 5, 3 and 7:

8⋅1+5⋅2+0⋅3+9⋅4+5⋅5+3⋅6+7⋅7=1468 \cdot 1 + 5 \cdot 2 + 0 \cdot 3 + 9 \cdot 4 + 5 \cdot 5 + 3 \cdot 6 + 7 \cdot 7 = 146

The sum ends in 6, which matches. Because neighbouring digits get different weights, the check catches every swap of two adjacent digits and most single-digit typos.

A valid check digit only proves the number is well formed. CAS Common Chemistry lists 131959-78-9 and 172964-80-6 as deleted or replaced numbers for omeprazole, and 131959-78-9 still appears among PubChem's synonyms for the compound. It passes the check digit test. CAS calls itself the source and final authority for its numbers, so for anything regulatory, confirm the number with CAS rather than a secondary database.[7][5]

The full registry sits behind CAS SciFinder, which is a paid product. CAS Common Chemistry is the free route, covering nearly 500,000 common and frequently regulated substances, which is enough for most reagents and drugs but not for a new intermediate.[5]

PubChem CIDs

PubChem keeps two kinds of records. A substance (SID) is what a depositor submitted, and PubChem had 351.5 million of them on October 30, 2026. PubChem standardizes those deposits and merges identical structures into compounds, each with a compound identifier (CID); there were 124.9 million.[8]

One CID stands for one standardized structure. Enantiomers, salts and hydrates therefore get CIDs of their own, as Table 3 shows, and PubChem links each salt back to its parent compound. A CID is short and the quickest way to point at a PubChem page (pubchem.ncbi.nlm.nih.gov/compound/9568614), but it means nothing outside PubChem: ChEMBL, DrugBank and the PDB all number compounds their own way. To cross between them, use the InChIKey.

Which identifier should you use?

TaskUseWhy
Searching the web or a database for a known structureInChIKeySame string in every database and safe to paste into a search engine
Finding all stereoisomers and labelled formsFirst InChIKey blockStereo and isotopes live in the second block
Ordering, safety data sheets, customs and regulatory formsCAS number of the exact salt or hydrateSuppliers and regulators index substances by CAS number
Supporting information for a paperIsomeric SMILES, with InChI or InChIKey alongsideMachine readable; some journals require SMILES
Input to docking, descriptors or machine learningIsomeric SMILESEvery toolkit reads it, and it keeps stereochemistry
Archiving or exchanging structures between groupsInChI plus the SMILES as drawnStandard normalization, and the SMILES keeps the tautomer you meant
Pointing at a PubChem recordCIDShortest stable link to that page
Table 4. Choosing a chemical identifier by task.

For papers, the requirements are getting more specific. The Journal of Medicinal Chemistry asks authors to submit a SMILES string for every molecule discussed, along with its biological data, as a CSV file in the supporting information.[10] A CAS number in the experimental section does a different job: it tells the reader exactly which salt or hydrate you bought.

Most identifier mistakes come from treating one identifier as another. A CAS number copied from a catalogue for the hydrochloride ends up next to the free base's structure. A non-isomeric SMILES goes into a docking run and the stereocentre is assigned at random. An InChIKey search for a salt returns nothing because the parent was registered instead.

Getting every identifier from SketchIQ

The search box in SketchIQ takes whatever identifier you already have: a name, CAS number, PubChem CID, InChIKey, InChI, SMILES or extended SMILES. Press Enter and the structure lands on the canvas, ready to edit, or draw a new structure from scratch.

The details panel then lists the identifiers below the properties. The canonical SMILES comes from RDKit and the InChIKey from the Indigo toolkit, both calculated in your browser, so they appear for any structure you draw, including ones no database has seen.

For a drawing with racemic or relative stereo groups (AND and OR), the panel shows a labelled non-standard InChIKey, whose second block ends in NA instead of SA, because standard InChI cannot hold those groups.

Figure 1. Esomeprazole loaded in SketchIQ by its CAS number. SMILES and InChIKey are calculated in the browser; the CAS number and CID come from PubChem.

The CAS number and PubChem CID come from PubChem, which SketchIQ asks using only the structure's InChIKey. The CID links straight to the PubChem page, and a switch in the drawer's settings turns the lookup off.

For the CAS number, the drawer takes the first CAS-shaped synonym in PubChem's record whose check digit is valid. That is usually the current number, but as omeprazole shows, PubChem's synonyms can include deleted ones, so confirm it with CAS before it goes on a regulatory form.

The full InChI is in the Export menu, which copies or downloads InChI, SMILES and extended SMILES, copies the InChIKey, and writes MOL, SDF and the ChemDraw formats compared in chemical file formats. For a list of compounds rather than one drawing, SMILES to InChI and InChI to SMILES convert in bulk, and PubChem Download fetches SDF and JSON records by CID, name or InChIKey.

Frequently asked questions

Can you convert an InChIKey back to a structure?

No. The InChIKey is a one-way hash, so the structure can only be recovered by looking the key up in a database that already holds it, such as PubChem. If you need an identifier that converts back, keep the InChI or a SMILES.

Is the InChIKey unique?

Practically, for real compounds. Collisions are possible by design, but the chance of one in a database the size of PubChem is about one in 5,000, and the only known cases involve constructed molecules with dozens of stereocentres or very long alkyl chains.[3]

How do I find the CAS number of a compound?

Search for the compound by name or structure in CAS Common Chemistry, which is free for nearly 500,000 common substances, or in PubChem, where CAS numbers appear among the synonyms.[5] SketchIQ shows the CAS number from PubChem's record next to the structure. For uncommon substances you need CAS SciFinder or CAS's paid lookup service.

Why does PubChem list several CAS numbers for one compound?

PubChem collects synonyms from its depositors, and some of them carry old, deleted or related numbers. Omeprazole's record includes five CAS-shaped strings, one of which CAS lists as deleted or replaced.[7]

Do enantiomers have different identifiers?

Yes, in every system here. Esomeprazole and omeprazole have different CAS numbers, CIDs, isomeric SMILES and InChIs. Their InChIKeys share the first 14 letters and differ in the second block.

Is SMILES or InChI better?

They do different jobs. SMILES is shorter, readable by every toolkit and keeps the structure as drawn, which makes it the format to feed software. InChI is standardized, so two programs give the same string for the same compound, which makes it the better identifier. Most databases store both.