XML Formatter
Beautify, validate, and minify XML without uploading anything.
Format, validate, and minify XML. Free, offline, runs entirely in your browser. Read more Show less
What is XML formatting?
XML is used in SOAP APIs, RSS feeds, sitemaps, SVG, and configuration files. Unlike JSON, XML is verbose, so unformatted XML is very hard to read. Formatting adds indentation and line breaks; minifying removes them before transmission.
How to use
Paste XML into the input box. Choose an indent, then Format or Minify. Validation runs on every keystroke: mismatched tags, unescaped ampersands, and unclosed attributes are reported with the line and column.
FAQ
Does this tool send my XML anywhere?
No. Parsing and formatting run in your browser.
What about DTDs and namespaces?
Parsing uses the browser's built-in XML parser, so namespaces and DOCTYPE declarations are handled. External DTDs are not fetched.
Why does my XML fail to parse?
Common causes: an unescaped & (should be &), a missing closing tag, or an XML declaration not at the very start of the document.
Can I format a large XML file?
Yes, but very large documents (tens of MB) may take a moment. Minifying is faster than formatting.