XML Formatter

Format and validate XML with readable indentation while preserving mixed text and significant whitespace.

Free No sign-up Runs in your browser

1 Your input

Mixed text content and preserved whitespace are kept intact. DTD declarations are not supported.

2 Result

Your result will appear here

Everything is processed in your browser.

What is XML Formatter?

XML Formatter is a free online developer tool from GigaTools. Format and validate XML with readable indentation while preserving mixed text and significant whitespace. It runs entirely in your web browser, so nothing is uploaded and it works on any device without installing software.

Common uses

  • Read compact XML responses
  • Find malformed tags and characters
  • Format XML configuration files

How it works

How to use XML Formatter

Paste your XML

Paste one complete XML document, with quoted attributes and escaped special characters.

Choose indentation

Choose two spaces, four spaces or tabs. XML syntax is checked before formatting.

Format and copy

Click Format XML, review the result and copy it or download an XML file.

FAQ

Good to know

How do I use XML Formatter?

1. Paste your XML: Paste one complete XML document, with quoted attributes and escaped special characters. 2. Choose indentation: Choose two spaces, four spaces or tabs. XML syntax is checked before formatting. 3. Format and copy: Click Format XML, review the result and copy it or download an XML file.

Does this validate an XML schema?

No. This checks well-formed XML only, not XSD or application rules. DOCTYPE declarations are rejected.

Is mixed content preserved?

Yes. Mixed text, CDATA and xml:space="preserve" content are not reindented. Input is limited to 2 MB.

Is this tool free?

Yes. This tool is free to use and does not require an account.

Are my files uploaded?

No. Processing happens in your browser. Your input and output files stay on your device.