XML Formatter

Format, validate and minify XML with clean indentation, right in your browser.

🔒 Runs in your browser. Your data never leaves your device.

How to use

  1. Paste your XML.
  2. Click Format or Minify.
  3. Copy or download the result.

Format and check XML

Unformatted XML on a single line is hard to read. This tool checks that your XML is well-formed, then indents each element or compresses it into the smallest form for transfer.

Features

  • Validation with the browser’s own XML parser.
  • Indent with 2 or 4 spaces or a tab.
  • Comments, CDATA and the XML declaration are kept.

Everything runs locally; nothing is uploaded.

Frequently asked questions

What does well-formed mean?
Tags are properly opened, closed and nested, with one root element.
Does it validate against a schema?
No, only well-formedness is checked.
Is my XML uploaded?
No, it never leaves your browser.

Related tools