How to Batch Convert SMILES, Names and CAS Numbers in a CSV File
Short answer: Open the free batch chemical converter, paste your list or press Open CSV / TSV / TXT, pick the identifier column, tick the outputs you need and press Convert. Then press Download CSV, Download TSV or Download SDF. SMILES are processed on your device, up to 5,000 rows. Names, CAS numbers, CIDs, InChI and InChIKeys are looked up in PubChem.
Why convert in batches
Supplier catalogues, screening libraries and lab notebooks often hold hundreds of compounds as SMILES, names or CAS numbers. Converting them one by one is slow and error-prone. A batch converter turns the whole list into one table with the same method for every row, which makes values comparable and duplicates easy to find.
Identifiers and properties in brief
| SMILES | A line notation for a structure, such as CCO for ethanol. Many SMILES can describe one molecule. |
|---|---|
| Canonical SMILES | One standard SMILES per structure. Use it to match and remove duplicates. |
| InChI and InChIKey | IUPAC identifiers. The InChIKey is a 27-character hash of the InChI, used to search databases. |
| CAS Registry Number | A registry number such as 58-08-2 (caffeine). The last digit is a check digit. |
| PubChem CID | The compound number in PubChem, such as 2519 for caffeine. |
| MW and exact mass | MW uses average atomic weights. Exact mass uses the most abundant isotopes, for mass spectrometry. |
| cLogP | Calculated log of the octanol–water partition coefficient. Higher means more lipophilic. |
| TPSA | Topological polar surface area, the surface of N and O atoms and their H. Above about 140 Ų, oral absorption is usually poor. |
| Lipinski’s rule of five | MW ≤ 500, LogP ≤ 5, at most 5 H-bond donors, at most 10 acceptors. More than one violation suggests poor oral absorption. |
How to use the batch converter step by step
- Open the batch chemical converter. To try it first, press Load 20 example drugs.
- Paste one value per line, or press Open CSV / TSV / TXT and choose your file.
- Read the line under the box: it shows the number of lines and columns and the separator found. Change Separator if needed.
- For tables, choose the Identifier column and tick First row is a header if row 1 has column names.
- Leave Input type on Detect for each row for mixed lists, or force one type.
- Under Outputs, tick what you need. InChI, InChIKey and IUPAC name are marked online.
- Press Convert. Watch the progress bar and the error count. Stop ends the run and keeps finished rows.
- Check the preview table. Failed rows are red, with the reason in the Status column.
- Press Download CSV, Download TSV or Download SDF.
Worked examples
1. A plain list of SMILES
Input: CC(=O)Oc1ccccc1C(=O)O, CN1C=NC2=C1C(=O)N(C(=O)N2C)C and CCO on three lines. Output, calculated on your device:
| Aspirin | C9H8O4 · MW 180.159 · exact mass 180.0423 · TPSA 63.6 · HBD 1 · HBA 4 · Pass |
|---|---|
| Caffeine | C8H10N4O2 · MW 194.19 · exact mass 194.0804 · TPSA 58.4 · HBD 0 · HBA 6 · Pass |
| Ethanol | C2H6O · MW 46.069 · exact mass 46.0419 · TPSA 20.2 · HBD 1 · HBA 1 · Pass |
2. A spreadsheet with IDs and activities
A file with the columns id;smiles;IC50 uses semicolons. The converter finds the separator, the header and the SMILES column. With Keep my other columns in the output ticked, id and IC50 sit next to the results in the download.
3. CAS numbers from a chemical inventory
Inputs such as 50-78-2 (aspirin) and 58-08-2 (caffeine) pass the check digit test and are looked up in PubChem. A typo such as 50-78-3 fails at once with "CAS check digit is wrong", without a network request.
4. Spotting a Lipinski failure
Atorvastatin has MW 558.6 g/mol and a cLogP above 5. Two limits are broken, so the Lipinski column says Fail and the violations column lists "MW > 500; LogP > 5".
Summary: what is calculated where
| On your device | Reading SMILES, canonical SMILES, molecular formula, MW, exact mass, cLogP, TPSA, HBD, HBA, rotatable bonds, Lipinski, SDF structures |
|---|---|
| Online (PubChem) | Names, CAS numbers, CIDs, InChI and InChIKeys as inputs; InChI, InChIKey and IUPAC name as outputs |
| Limits | 5,000 rows per run; 1,000 online lookups per run at about four per second |
| Downloads | CSV and TSV (UTF-8, opens in Excel), SDF with data fields |
Common mistakes
- Spreadsheet auto-formatting. Excel can turn CAS numbers into dates and drop leading zeros. Format the column as text before saving.
- A header row read as data. Tick First row is a header, or the header appears as a failed row.
- Mixed names and SMILES with a forced type. Use Detect for each row for mixed lists.
- Salts.
CC(=O)[O-].[Na+]is one entry, and MW includes the sodium. Remove counter-ions first if you want the parent. - Mixing LogP methods. cLogP and PubChem’s XLogP3 differ slightly. Use one method for a series.
- Stereochemistry lost on export. Keep @ and @@ in your SMILES. The canonical SMILES keeps them, so D- and L-alanine stay different.
Tips for clean results
- Convert names and CAS numbers to SMILES once, save the CSV, and reuse it. Later runs are then fully local and fast.
- Sort the output by canonical SMILES to find duplicates.
- Use the SDF download to load the set into other chemistry software with all properties attached.
- Check a few rows by hand with the single tools, such as the molecular weight calculator.
Questions and answers
How do I get molecular weights for a list of SMILES?
Paste the SMILES into the free MolDraw batch chemical converter, one per line, or open your CSV and pick the SMILES column. Keep MW (g/mol) ticked, press Convert, then Download CSV. SMILES are processed on your device, up to 5,000 rows per run.
Can I convert chemical names or CAS numbers to SMILES in bulk?
Yes. Names, CAS numbers, PubChem CIDs, InChI and InChIKeys are looked up in PubChem one row at a time, at about four rows per second. Each result gives a SMILES, and all the other outputs are then calculated from it.
What is a canonical SMILES and why use it?
A molecule can be written as many different SMILES. A canonical SMILES is one standard form, so the same structure always gives the same string. Sorting or matching on canonical SMILES finds duplicates, such as CCO and OCC for ethanol.
What is the difference between molecular weight and exact mass?
Molecular weight uses average atomic weights and is used for weighing and molarity. Exact (monoisotopic) mass uses the most abundant isotope of each element, such as ¹²C, ¹H and ¹⁶O, and is what a high-resolution mass spectrometer measures. Aspirin has MW 180.159 g/mol and exact mass 180.0423.
Why does my CSV open as one column?
The file probably uses semicolons or tabs instead of commas, which is common in European spreadsheet settings. The converter detects the separator automatically. You can also choose Comma, Tab, Semicolon or Pipe under Separator.
Is the InChIKey calculated on my computer?
No. InChI, InChIKey and IUPAC name are fetched from PubChem, so those outputs are marked online. Canonical SMILES, formula, MW, exact mass, cLogP, TPSA, donors, acceptors and the Lipinski check are calculated on your device.
Can I keep my own columns, like compound IDs and IC50 values?
Yes. Tick Keep my other columns in the output. Every column except the identifier column is copied into the results, in the same order, so you can paste the file straight back into your spreadsheet.