Skip to content
HQ8T

XML Formatter

Beautify, validate or minify XML.

Output

How to use

  1. 1Paste your XML into the box.
  2. 2Choose 2 spaces, 4 spaces, tabs or minify.
  3. 3Fix any error shown with its line and column.
  4. 4Copy the result or download it as a file.

Frequently asked questions

Does it check that my XML is valid?

It checks that the XML is well-formed: tags are closed and nested correctly and attributes are quoted. It doesn't validate against an XSD schema.

Is my XML uploaded?

No. Formatting uses your browser's built-in XML parser; nothing is sent anywhere.

Are comments and CDATA kept?

Yes. Comments, CDATA sections and processing instructions are kept in the output.

What does minify do?

It removes all indentation and line breaks between tags, making the file as small as possible.