XML Formatter — Free Online Tool
Pretty-print messy XML with clean 2-space indentation, or minify it to a single line. Paste, click, copy — done.
Your formatted XML will appear here after you click Format or Minify.
Formatted
Instant results — no waiting
No sign-up needed
Free forever
How it works
1Paste your XML into the box above — or try the sample.
2Press Format for a clean indented view, or Minify for a single line.
3Copy the result with one tap and use it wherever you need it.
Frequently asked questions
Is my XML uploaded to a server?
No. Parsing and formatting run entirely with your browser's built-in DOMParser — your XML never leaves this page, and nothing is uploaded or stored anywhere.
What happens if my XML is invalid?
You get a friendly error box showing exactly what went wrong, taken from the parser's own message — usually an unclosed tag or a bad character — so you can fix it and try again.
Does minifying change my XML's meaning?
No. Minify only removes whitespace-only text between tags, so the document structure and all real text content stay exactly the same — just more compact.
DOMParser-based · 2-space indentation · 100% local — your XML never leaves this page.