XML Viewer/Formatter

Pretty-print and format XML documents

XML Input

Error
Indent Size:

Error

Failed to parse XML

What is XML Viewer/Formatter?

XML Viewer/Formatter takes minified or poorly formatted XML and transforms it into beautifully indented, syntax-highlighted output. Validates XML structure, shows line numbers, and supports collapsible tree view — perfect for inspecting API responses, configuration files, or any XML document.

How to use

  1. Step 1 — Paste raw or minified XML into the input area. Invalid XML is flagged with specific error locations.
  2. Step 2 — Choose your indent size (2 or 4 spaces, or tab) and view the formatted output with syntax highlighting.
  3. Step 3 — Copy the formatted XML, download it as a file, or use the tree view to explore deeply nested structures.

Result

An API returns a single-line 50KB XML response. Paste it in to get properly indented output with color-coded tags, attributes, and values — making it easy to find the error node buried 8 levels deep.

Related Tools