Data Formats2026-06-20

How to Open an XML File (and Convert It)

Open an XML file in a browser, text editor, or Excel — and convert it to JSON or a spreadsheet. Easy step-by-step methods for any device.

xmldata-formatsdeveloper-toolsjson

How to Open an XML File (and Convert It)

You can open an XML file in any web browser (it renders the tag tree), a text editor, or Excel (Data → From XML) to view it as a table. To make it readable, paste it into an XML formatter that indents the tags, or convert it to JSON for easier processing.

An .xml file is plain text, so opening it is easy — the goal is usually to read it clearly or transform it. Here's how.

What Is an XML File?

XML (eXtensible Markup Language) stores structured data using nested tags:

<user>
  <name>Ada</name>
  <roles>
    <role>admin</role>
    <role>editor</role>
  </roles>
</user>

It's verbose but self-describing, and still common in configs, RSS feeds, SOAP APIs, Office documents, and sitemaps.

Open It in a Web Browser

The fastest way to read XML: drag the file into Chrome, Firefox, or Edge. Browsers render XML as a collapsible, color-coded tree so you can expand and explore nested elements without any tooling.

Open It in a Text Editor

To edit XML, open it in a text editor:

  • Windows: Notepad, or VS Code / Notepad++ for highlighting.
  • macOS: TextEdit, or VS Code.

VS Code adds syntax highlighting, tag folding, and error squiggles — far easier than Notepad for anything non-trivial.

Open It in Excel as a Table

XML that represents records can open as a spreadsheet:

  1. Excel → DataGet DataFrom FileFrom XML.
  2. Select the file; Excel maps repeating elements to rows and columns.

This works best for flat, record-like XML. Deeply nested XML may need flattening first.

Format It for Readability

Minified or single-line XML is hard to read. Paste it into our XML Formatter to indent and color-code the structure instantly. To confirm the document is well-formed (tags properly closed and nested), run it through the XML Validator.

Convert XML to JSON

For working with XML in modern apps and APIs, JSON is usually easier. Our XML to JSON tool converts the tag tree into clean JSON you can then format with the JSON Formatter. See also How to Convert XML to JSON for the details and edge cases.

Frequently Asked Questions

How do I open an XML file? Drag it into a web browser to read it as a tree, open it in a text editor like VS Code to edit it, or use an online XML formatter for a clean view.

How do I open an XML file in Excel? Use Data → Get Data → From File → From XML; Excel maps repeating elements into rows and columns.

What is an XML file? A plain-text file that stores structured data using nested, self-describing tags — common in configs, feeds, and documents.

How do I make XML readable? Paste it into an XML formatter to indent and highlight it, or open it in an editor that pretty-prints and folds tags.

How do I convert XML to JSON? Use an XML-to-JSON converter, which turns the tag tree into equivalent JSON objects and arrays.

Related Reading

An XML file is just text wrapped in tags. Open it in a browser to read, an editor to change it, or a converter to turn it into JSON or a spreadsheet — whatever the next step requires.