Text Files

XML File Viewer

Explore a local XML file as data. Browse its elements, attributes, and text, or view its original and formatted source.

All files are processed only in your browser and are never uploaded to a server.

About this tool

The XML File Viewer displays a document as an expandable data tree and plain source text. SVG and script-like nodes are never executed as web content.

How to use

  1. Select or drag in a local XML file.
  2. Review the parsing result and any errors. Follow the message if the document contains an unsupported declaration.
  3. Browse elements, attributes, text, comments, and CDATA in the tree.
  4. Switch to the original source or formatted XML, then copy or download it as needed.

Features

  • View an expandable tree, original source, and formatted XML.
  • Inspect elements, attributes, namespaces, text, comments, and CDATA.
  • Expand nodes as needed, with limits on how much content appears at once.
  • External entities are never loaded, and SVG or HTML content is never rendered automatically.

Viewing XML content

  • XML is markup that describes data. This tool shows its structure and source without turning it into an interactive web page.
  • Documents with DOCTYPE or entity declarations are not supported. Remove those declarations before opening the file. External documents and entities are never loaded.
  • SVG files appear only as XML trees and source text. Use the SVG Preview tool to preview an image.

Limits

  • Each XML file can be up to 20 MiB. A memory notice appears at 10 MiB.
  • Files can contain up to 200,000 nodes and 128 nesting levels. Simplify larger files first. The tree loads up to 200 children per batch and displays up to 5,000 nodes at a time. Expand all is limited to trees with up to 1,000 nodes.
  • Fix malformed XML before opening it. This tool does not automatically repair invalid markup.

Privacy

All files are processed only in your browser and are never uploaded to a server.

File names, entered text, and results are processed only in your current browser. Your input is not saved automatically. Download any results you want to keep before clearing the tool or leaving the page.

FAQ

What's the difference between XML and HTML?

XML commonly describes and exchanges data, while HTML organizes web page content. This tool displays the input as XML data instead of rendering a web page.

Will the XML viewer run scripts?

No. Nodes and attributes appear only as text and a data tree. File content is never inserted as executable web content.

Will SVG XML be rendered as an image?

No. SVG remains XML data here. Use the separate SVG Preview tool to preview the image.

Are external entities loaded?

No. Documents containing DOCTYPE or entity declarations are restricted. The tool never fetches external DTDs or entities.

Can I view large XML files?

Each file can be up to 20 MiB, and tree branches expand on demand. Complex or deeply nested documents may still use substantial memory, so choose files your device can handle.

Back to Developer Tools