Open & View XML Files Online
Open an XML file online without installing anything: tree of elements and attributes, formatting, download, syntax errors with line and column. No upload.
How do you open an XML file online? Drop the .xml file on this page or paste its contents: your browser parses it locally and shows a collapsible tree on the right with every element, its attributes (prefixed @_) and values; switch to Code for the raw text, click Format XML to re-indent a minified file, then copy it or download it as .xml. An unclosed tag or unquoted attribute is reported with its line and column. Unlike Excel, which flattens XML into a table and can lose the hierarchy, Notepad, which shows plain text only, or Edge and Chrome, which show the tree but cannot format it, you keep the full structure here and can edit it. No upload, no sign-up.
Drop a .xml file or paste XML to open it instantly as a tree, format it, copy or download it, and see syntax errors with line and column. Everything runs in your browser; the file is never uploaded.
0
Enter XML to view structure
Enter XML to view structure
You May Also Need
How to open an XML file online (three steps)
- 1
Drop the .xml file
Drag it into the input area or click Upload File (the .xml extension is required). XML received by email can also be opened in Notepad and pasted here.
- 2
Read the tree
On the right, elements are nodes, attributes start with @_ and values are shown alongside. The tree opens two levels deep; click the arrows to go further, or Code to return to the text.
- 3
Format, copy or download
Format XML re-indents the document; the input area is editable, so fix the text if needed, then click Copy or Download (document.xml).
- 4
Fix reported errors
If Invalid XML appears, the message names the problem and its position (line, column): unclosed tag, unquoted attribute, multiple root elements. The tree updates as soon as you fix it.
References
- W3C — Extensible Markup Language (XML) 1.0
The official specification defining the well-formedness rules this tool checks: matched tags, a single root, quoted attribute values.
- MDN — XML introduction
Overview of elements, attributes, the XML declaration and what makes a document well-formed.
- Microsoft Support — Import XML data in Excel
Official guide to opening or importing an XML file in Excel and the limits of that approach (inferred schema, structure flattened into a table).
- Wikipedia — XML
Background on the origin, syntax and uses of the XML format.
Related Tools
XML to JSON
Convert an XML document into a JSON object that is easier to work with in code.
XML Minifier
Strip indentation and line breaks to shrink XML to its smallest size.
JSON to XML
The reverse path: generate an XML document from JSON data.
HTML Viewer
Another markup language: view and format HTML source online.
Frequently Asked Questions
- How do I open an XML file?
- Four common ways: online, by dropping the file on this page (tree view, formatting, download, nothing to install); with Notepad or VS Code, which show the raw text; with Edge or Chrome, which show a collapsible tree but cannot format or edit it; or with Excel, which imports it as a table. To read the content or find an error, the first is quickest.
- What happens if I open XML in Excel?
- Excel asks whether to open it as an XML table, a read-only workbook or via the XML Source pane. As a table it infers a schema and flattens repeated elements into rows and attributes into columns; deeply nested or mixed content gets split, merged or rejected. It suits regular tabular data but not inspecting structure or editing the original; use the tree here for that.
- What is a .xml file?
- XML (eXtensible Markup Language) is a plain-text format that describes hierarchical data with nested tags and attributes. You find it in configuration files, Office documents, RSS feeds, SVG images, e-invoices and Android layouts. Any text editor opens it, but without indentation it is hard to read, which is why a tree view and formatting help.
- Is it safe? Is the file uploaded to a server?
- No. Parsing, formatting and the syntax check run entirely in your browser; nothing is sent and no account is needed. You can open XML containing personal or business data, and once the tab is closed nothing remains.
- Can I edit the XML online?
- Yes. The input area is a syntax-highlighted editor and every change updates the tree; then format, copy or download. It is a lightweight editor: there is no XPath query, no XSD or DTD schema validation and no find-and-replace.
- Does the viewer validate XML? What does it check?
- It checks that the document is well-formed: tags opened and closed in pairs, quoted attribute values, a single root element, allowed characters; on error it shows the cause, line and column. It does not validate against an XSD schema or DTD; that needs the schema and a dedicated validator.
- Can I open large XML files?
- Yes. There is no upload limit because everything runs locally; the limit is your device's memory. Files of a few dozen MB open in seconds; for larger ones, close other tabs or paste only the part you need to inspect.
- What does the @_ prefix in the tree mean?
- To tell attributes apart from child elements, the tree shows attributes with an @_ prefix: <price currency="USD"> appears as @_currency: USD. It is only a display convention; the original XML and the downloaded file are unchanged.