Format and validate XML
Beautify or minify XML, with clear parse errors.
Files stay on your device. No accounts. Free.
Loading tool...
About this tool
Paste XML and see it indented cleanly, or minified to a single line, live as you type. Invalid XML gets the parser's actual error message instead of silent failure, which makes this a quick validator too.
Config files, SOAP payloads, Android manifests, RSS feeds; parsing uses the browser's own XML engine and never leaves your machine.
How it works
- Paste your input, or drop a text file onto the box.
- The output updates live as you type.
- Copy it to the clipboard, or download it as a file.
Frequently asked questions
How do I find out why my XML is invalid?
Paste it and the error line appears immediately, typically an unclosed tag, a stray ampersand, or mismatched nesting. Fix it and the formatted output appears the moment the document parses.
Are comments and CDATA sections preserved?
Yes, comments and CDATA blocks survive both beautify and minify. Attribute order is kept as written.
What is the difference between beautify and minify here?
Beautify indents nested elements two spaces per level for reading. Minify strips inter-element whitespace for compact storage or transmission. The document structure is identical either way.