.CML file extension

To open .CML files on Windows, try opening the file in Avogadro (it supports CML and can display the molecular structure).

To open a .cml file, use a chemistry or conversion tool that supports Chemical Markup Language, such as Avogadro or Open Babel. Because CML is XML, you can also inspect it in a plain text editor, but specialized software is needed to view chemical structures properly.

Last updated: April 29, 2026 · Reviewed by Julian Stricker

Open on your device

Choose your operating system for a dedicated step-by-step opening guide.

How to open .CML files

Use these platform-specific instructions to open .CML files safely.

Windows

  1. Try opening the file in Avogadro (it supports CML and can display the molecular structure).
  2. If you need conversion or the file won’t load, use Open Babel to import the .cml and convert it to another chemical format.
  3. For inspection only, open the .cml in a text editor to confirm it contains XML (look for tags like <cml> near the top).
Full Windows guide

Mac

  1. Open the .cml file with Avogadro to view and edit chemical structures.
  2. Use Open Babel if you need to convert the .cml to another format or troubleshoot compatibility.
  3. If you only need to read the raw contents, open it in a plain text editor (it should be XML).
Full Mac guide

Linux

  1. Open the .cml file in Avogadro to view the chemical structure and related data.
  2. Use Open Babel to read the file or convert it to another chemistry format if needed.
  3. For quick inspection, open it in a text editor and verify it is valid-looking XML.
Full Linux guide

iOS

  1. iOS does not commonly provide dedicated CML chemistry tools; for reliable viewing/conversion, transfer the .cml to a desktop and open it with Avogadro or Open Babel, or inspect the XML as text if that’s all you need.
Full iOS guide

Android

  1. Android does not commonly provide dedicated CML chemistry tools; for dependable viewing/conversion, move the file to a desktop and open it with Avogadro or Open Babel, or view it as plain XML text if appropriate.
Full Android guide

Security notes

  • A .cml file is XML, not an executable; the main risk is from malformed or intentionally crafted XML that could exploit weaknesses in a parser, so open untrusted CML only in well-maintained chemistry tools.
  • If you must inspect an unknown .cml file, open it first in a plain text viewer/editor to confirm it is reasonable XML rather than an unrelated file masquerading as .cml.
  • Be cautious when importing CML into automated pipelines: a bad file can cause crashes or resource exhaustion in XML processing; validate and size-limit inputs when possible.

Recommended antivirus software

Scan files before opening them. These antivirus tools help protect against malware and viruses.

We may earn a commission when you use affiliate links. This supports our free file extension guides.

Can't open this file?

These are the most common causes and fixes when .CML files fail to open.

Common reasons

  • The .CML file opens as plain text instead of a molecule/structure
  • The file won’t open or imports with missing/incorrect data
  • Wrong file type: the .cml extension is used but the content is not CML (XML)
  • Conversion results look different (coordinates, bonding, or metadata changes)

Fix steps

  1. Open the file in a chemistry application that supports CML (for example, Avogadro) to render the structure.
  2. If your goal is conversion, use Open Babel to convert the .cml into another chemical format your target tool supports.

What is a .CML file?

Chemical Markup Language (CML) is an XML-based language for representing chemical information. A .cml file typically contains structured chemical data (for example, molecule definitions) encoded as XML elements and attributes. CML files can also be validated against published CML schemas to check correctness.

Background

CML (Chemical Markup Language) is designed for interchange and long-term preservation of chemical information using XML. It is used to represent core chemistry concepts in a structured, machine-readable way, which makes it suitable for data exchange between tools and workflows.

In practice, CML files are often produced or consumed by chemistry applications and toolkits. For example, Avogadro historically used CML as its original save format and still supports it, and Open Babel can read and write CML for conversion and interoperability.

Because CML is plain-text XML, it is also convenient for troubleshooting and version control: you can open it in a text editor to see the underlying data. However, rendering molecules, checking chemistry semantics, or converting to other chemistry formats is typically done with dedicated chemistry software.

Common MIME types: chemical/x-cml

Further reading

Authoritative resources for more details on the .CML format.

Common .CML issues

The .CML file opens as plain text instead of a molecule/structure

CML is XML, so general-purpose editors will show tags and values rather than a chemical diagram.

  1. Open the file in a chemistry application that supports CML (for example, Avogadro) to render the structure.
  2. If your goal is conversion, use Open Babel to convert the .cml into another chemical format your target tool supports.

The file won’t open or imports with missing/incorrect data

CML has schemas and multiple conventions; some software only supports parts of CML or expects certain elements/versions.

  1. Try opening the file in an alternative tool (e.g., Avogadro vs. Open Babel) to compare results.
  2. If you can, validate or check the file against the published CML schema documentation to spot structural issues or unsupported constructs.
  3. Open the file in a text editor to check whether it appears truncated (incomplete XML) or malformed (unclosed tags).

Wrong file type: the .cml extension is used but the content is not CML (XML)

Some files may be mislabeled; a genuine CML file should look like XML and typically contains CML-related tags.

  1. Open the file in a text editor and confirm it is XML-based and resembles CML (not binary or unrelated text).
  2. If it is not XML/CML, ask the sender for the correct format or export option rather than renaming extensions.

Conversion results look different (coordinates, bonding, or metadata changes)

Interchange formats may represent structures and metadata differently, and conversions can drop or reinterpret fields depending on tool support.

  1. Convert using Open Babel and test a couple of target formats to see which preserves what you need.
  2. After converting, re-open both the original and converted file in a viewer (e.g., Avogadro) and compare key properties (atoms, bonds, coordinates, identifiers).

FAQ

What does .cml usually mean?

Most commonly, .cml refers to Chemical Markup Language (CML), an XML-based format for representing chemical information.

Can I open a .cml file in a web browser or text editor?

You can view the raw XML in a text editor (and often in a browser), but you typically need chemistry software (e.g., Avogadro) to visualize the molecular structure and work with chemical data.

How do I convert .cml to another chemistry format?

Open Babel supports reading and writing CML and is commonly used to convert .cml to other chemical formats.

Is there an official MIME type for CML?

Wolfram documentation lists the MIME type as chemical/x-cml.

Similar file extensions

Compare related formats in the same category to find the right tool faster.