or drop a file here, or paste code below
Type, paste or open XML to check it.

Document tree

The tree appears when you open or type XML.

Files never leave your browserHow?

XML viewer, formatter and XPath search

Open an XML file to see it as a collapsible tree and highlighted code. Format it, check that it is well-formed and find nodes with XPath. Nothing is uploaded.

How it works

  1. Open the XML

    Drop an .xml or .xml.gz file, use Open file or Open from URL, paste the markup or load the sample. The encoding comes from the BOM or the XML declaration.

  2. Explore it

    Expand and collapse elements in the tree; clicking a node jumps to it in the code. Search the code with Ctrl+F or run an XPath query.

  3. Format or convert

    Pretty-print or minify the document, download or copy it, or open it in the XML to JSON, CSV or Excel converter.

Features

  • Tree and code

    A collapsible tree next to syntax-highlighted code. Large elements open in pages of 200 children so the view stays fast.

  • XML formatter

    Format with 2 spaces, 4 spaces or tabs, or minify. CDATA, comments and xml:space="preserve" content stay as written.

  • Well-formedness check

    Mismatched or unclosed tags, bad attributes and undeclared prefixes are shown with line and column.

  • XPath search

    Run XPath 1.0 expressions such as //item[@id="2"] or count(//book); matches are listed and highlighted.

  • Compressed and untrusted files

    .xml.gz files are decompressed in the browser. External entities are never loaded and entity expansion is limited.

  • One click to converters

    XML → JSON, XML → CSV and XML → Excel open the current document in those tools.

Limits & privacy

Files can be up to 200 MB, also after decompressing an .xml.gz file. The tree and XPath are available up to 20 MB; larger documents are shown as text. Syntax highlighting works up to 5 MB.

DTD and XSD validation and XSLT are not supported, and external DTDs or entities are never fetched. To change the document, use the XML editor. See the privacy page.

FAQ

How do I open an XML file online?

Drop the file on this page or press Open file. It is shown as a tree and as formatted code; the file stays on your device.

Can I view .xml.gz files?

Yes. Compressed files are unpacked in your browser, so you can open gzipped sitemaps, feeds and exports directly.

Does this XML viewer work in Chrome, on Mac, Windows and Linux?

Yes. It runs in any modern browser, including Chrome, Edge, Firefox and Safari, without installing an app or extension.

Can I open XML files on Android or iPhone?

Yes. Open this page in your mobile browser and tap Open file; the tree and code have their own tabs on small screens.

How do I find an element in a large XML file?

Type an XPath expression such as //order[@status="open"] and press Run, or search the code with Ctrl+F.

Can I view NF-e or CFDI invoice XML here?

Yes, as plain XML. The viewer has no fiscal functions: it does not validate tax rules or signatures, and editing a signed invoice would invalidate its signature.

Is my file uploaded?

No. Reading, formatting and XPath all run locally in your browser.

Related tools