Tools/XML Formatter
Data & Config Formats

XML Formatter

Clean up minified or inconsistently indented XML into a readable, properly nested document.

Free & unlimitedRuns in your browserNo sign-up required
Loading tool…
How it works

Three steps, no setup

1

Paste your XML

Minified or partially formatted XML both work as input.

2

Pick an indent style

Choose 2 spaces, 4 spaces, or tabs.

3

Copy the formatted markup

Self-closing tags and processing instructions are handled correctly.

Common questions

Frequently asked questions

Does formatting validate the XML?
Malformed markup — like an unclosed tag — is flagged rather than silently reformatted incorrectly.
Are XML comments preserved?
Yes, comment nodes are kept in place during reformatting.
Chat with us
Usually replies in minutes