XML

XML Formatter

Paste XML to format it with clean indentation, minify it, or validate that it is well-formed. Runs locally.

Input

Local

Output

About this tool

About XML Formatter

The XML Formatter indents XML into a readable tree, can minify it back to a compact form, and checks that it is well-formed. It is for developers working with configuration files, SOAP payloads, RSS feeds, or any XML-based data format.

Raw XML from an API or export is often one dense block. Formatting it locally makes the structure legible and flags malformed markup, without sending the document to an external service.

How to use

Step by step

  1. Paste your XML into the input area.
  2. The formatter re-indents the elements to show the hierarchy.
  3. Switch to minify if you need a compact single-line version instead.
  4. If the XML is not well-formed, read the error to locate the problem.
  5. Copy the result or download it.
Key features

What it offers

  • Indented formatting and minification
  • Well-formedness checking
  • Clear error reporting
  • Runs entirely in the browser
Common use cases

Where it helps

  • Reading SOAP or other XML API responses while debugging
  • Tidying configuration and build files for review
  • Inspecting RSS or Atom feed structure
  • Preparing XML fixtures for tests
Best practices

Tips for best results

  • Well-formed is not the same as valid — this checks syntax, not conformance to a schema or DTD.
  • Minify XML for transport but keep an indented copy for editing.
  • Watch for unescaped ampersands and angle brackets in text content, a frequent cause of parse errors.
Benefits

Why people use it

Readable hierarchy

Indentation exposes nesting and mismatched tags.

Two directions

Format for reading or minify for transport.

Catches errors

Well-formedness checks surface broken markup.

Private

Your XML stays in the browser.

FAQ

Common questions

It re-indents XML elements for readability, can minify, and checks well-formedness.
No. Only whitespace changes when formatting.
No. Formatting runs in your browser.
That the document is well-formed XML; it reports the first parse error.
Private by design

This runs entirely in your browser

No file or text you enter here is uploaded. Encoding and decoding happen on your device using native browser APIs — close the tab and nothing remains on a server.

Install Toolisco Add it to your device for offline, one-tap access.