XML formatter — pretty-print or minify
Paste XML and get it indented by element nesting, or minified. It formats in your browser (0 uploads, works offline).
How to use it
- Paste your input into the left pane.
- Choose any options above the panes.
- The result updates live on the right — Copy or Download it.
FAQ
How do I format or minify XML for free?
Paste your XML and it is indented according to element nesting in your browser, with no upload. Tick minify to remove the whitespace between elements for a compact document.
Does formatting change the data?
No — only the whitespace between elements changes. The elements, attributes and text content are preserved, so the document means the same to any parser.
Is my XML uploaded?
No. Formatting runs locally and nothing is stored; it works offline.
Does it validate against a schema?
No — it indents rather than validates. It will tidy well-formed XML but does not check it against a DTD or XSD.
Limits
A pragmatic indenter. CDATA and mixed content are indented as text.
Related
The HTML and CSS formatters tidy those; JSON-to-XML converts JSON to XML.
Bookmark this page (Ctrl+D, or ⌘D on Mac) or install the app — it works offline the next time you need it.