file.wiki

File extensions

How to open a .xml file

XML document · Text / data

An .xml file is plain text. Drag it into any browser to see it as a collapsible tree, or open it in a code editor to work with it.

What a .xml file actually is

XML is a markup language for structured data, built from nested tags. It predates JSON and remains standard in configuration files, document formats, RSS feeds and enterprise data exchange.

Many formats you would not think of as XML are XML underneath. A .docx or .xlsx is a ZIP full of XML, which is why those files can be repaired by hand when they break.

Why it will not open

Windows often associates .xml with a browser or with nothing at all. Either way the file is readable text and nothing is missing.

Step by step

Windows

  1. 01Drag the file onto a Chrome, Edge or Firefox window. All three render XML as an expandable tree.
  2. 02To edit it, install Visual Studio Code or Notepad++ and open it there for syntax highlighting and tag matching.
  3. 03If the browser reports a parsing error, the XML is malformed. The error message names the line and column.

macOS

  1. 01Drag it onto Safari or Chrome for a tree view.
  2. 02Open it in TextEdit for the raw text, or in VS Code to edit it.
  3. 03In Terminal, "xmllint --format file.xml" reformats it and reports errors precisely.

Programs that open .xml

Our pick, in order. Every one links to the publisher's official download URL and the SHA-256 hash of the installer, so you can check the file before you run it.

Also registers .xml in its manifest

Taken straight from publisher manifests. Some of these handle the format for a narrow purpose rather than as their main job.

Common questions

How do I open an XML file in a readable format?
Open it in a web browser, which displays XML as a collapsible tree with indentation. For editing, use a code editor such as VS Code or Notepad++ that highlights syntax and matches tags.
Can Excel open an XML file?
Yes. In Excel use Data, Get Data, From File, From XML, and it will map the structure into a table. This works cleanly for regular repeating records and poorly for deeply nested documents.

Related formats