XML Formatter
Beautify, minify or validate XML with proper indentation — paste, format, copy. 100% in your browser, no upload.
🔒 Runs in your browser — nothing is uploaded.
Make messy XML readable — or compact it
Paste XML and this tool re-indents it into a clean, nested structure so you can actually read it, or minifies it back down to a single line with the whitespace between tags removed. Choose two spaces, four spaces or tabs for the indent. Short leaf elements like <name>Ann</name> stay on one line so the output isn’t needlessly tall.
Switch to Validate to check the XML is well-formed — it flags the first mismatched, unclosed or stray tag with a line number so you can find the break fast. Everything runs in your browser — the XML is never uploaded, so it’s safe for config files, SOAP payloads, RSS and API responses.
Frequently asked questions
What is the difference between beautify and minify?
Beautify adds line breaks and indentation to make nested XML readable; minify removes the whitespace between tags to make the file as small as possible.
Does it validate my XML?
The Validate mode checks that your XML is well-formed — flagging mismatched, unclosed or stray tags with a line number — but it does not check the XML against a schema or DTD.
Is my XML uploaded to a server?
No. Formatting happens entirely in your browser, so config files and API payloads never leave your device.
Can I choose tabs instead of spaces?
Yes. In beautify mode you can indent with 2 spaces, 4 spaces, or a tab character.