XML formatter
Paste XML and get a readable, indented version, or minify it to save bytes.
It works in your browser. We do not store or send anything you type.·Free · No sign-up required
Workspace · XML formatter
Runs in your browser · 100% local
Files are processed in your browser; if you are signed in with history enabled, text results appear in your history.
Instructions
How to use it
01
Paste the XML.
02
Choose the indentation size and press Format.
03
If the document is not well formed, the parser error is shown.
Examples
Examples
Sitemap
A <urlset> with several <url> nodes is shown one node per line.
Minify
Whitespace between tags is removed without touching text content.
Reference guide
What you need to know
Validation uses DOMParser with application/xml. Formatting adds line breaks and indentation between tags while preserving text nodes, CDATA and declarations.
Frequently asked questions
Frequently Asked Questions
Yes, they are kept and indented as nodes.
Related tools
Other tools that can help with similar tasks.
BetaWeb development
XML Validator
Checks whether an XML file is well-formed and identifies errors.
Open→Free · No sign-up requiredHistory
BetaWeb development
HTML Formatter
Indents and formats HTML to make it easy to read.
Open→Free · No sign-up requiredHistory
BetaWeb development
XML Sitemap Generator
Create a valid XML sitemap from a list of URLs.
Open→Free · No sign-up requiredHistory
