XML Formatter & Minifier
Re-indent messy XML with proper nesting — or minify it down for transport. Transformations happen in place.
How it works
The tokenizer walks tags, text, comments, CDATA and processing instructions, then re-emits them with indentation based on nesting depth. Text that contains only whitespace between tags is structural and gets re-indented; real text content stays attached to its element. Minify removes all structural whitespace while preserving text and CDATA exactly. Well-formedness is checked before every transform, and Undo restores the previous content.
FAQ
Does it validate my XML?
It checks well-formedness (balanced tags, proper quoting) while tokenizing and reports the problem if found. DTD/schema validation is not performed.
Is my XML uploaded?
No. Formatting runs in your browser with the native parser API.
XML Formatter & Minifier — FAQ
Is XML Formatter & Minifier free to use?
Yes. It is completely free, with no signup, no installation and no usage limits.
Is my data uploaded to a server?
No. The tool runs entirely in your browser — the data you paste or upload never leaves your device.
Does it work on mobile devices?
Yes. It works in any modern desktop or mobile browser, with nothing to install.