Free XML Formatter & Validator
Something not working? Report a problem
About the XML Formatter
Pretty-print and validate XML with the exact line and column of any error — formatted instantly in your browser, nothing is uploaded.
How to use the XML Formatter
- 1Paste your XML into the input box.
- 2Choose Beautify to add indented formatting, or Minify to strip whitespace.
- 3Any parse errors are shown with the problem location.
- 4Click Copy to grab the formatted result.
Frequently asked questions
What makes XML invalid?
Common mistakes include unclosed tags, attributes without quoted values, a missing root element, or characters like & < > that must be escaped as entities (& < >).
Does formatting change the data?
Beautify adds whitespace between elements only. Text content inside elements is preserved exactly. Minify removes only inter-element whitespace.
Is my XML uploaded anywhere?
No. Formatting uses the browser's built-in DOMParser and XMLSerializer — your data never leaves your device.
What XML version is supported?
XML 1.0, which covers virtually all XML in practice (SVG, RSS, SOAP, Maven POM, Android resources, etc.).
More developer tools
View allQR Code GeneratorCreate QR codes for links, text and Wi-Fi networks — customize size and colors, then download as PNG or SVG, all generated in your browser.Password GeneratorGenerate strong random passwords with custom length and character options — with a strength meter, created securely in your browser and never sent anywhere.UUID GeneratorGenerate random v4 or time-ordered v7 UUIDs — one or up to 100 at a time, with uppercase and no-hyphen options, all created in your browser.Base64 Encoder & DecoderEncode text to Base64 or decode Base64 back to text — UTF-8 safe with a URL-safe option, converted instantly in your browser with nothing uploaded.