An XML formatter is a free online tool that takes compressed or messy XML and pretty-prints it with clean indentation, so sitemaps, RSS feeds, SVG files, and config files become readable. It validates the XML first and reports errors in plain language.
Your formatted XML will appear here...
How do I format XML online?
Paste your XML into the input box, choose an indent style, and press Format. The tool validates the document first: if it is well-formed you get clean indented XML, and if not you get the parser error message telling you what is wrong.
Well-formed XML requires exactly one root element, matching open and close tags, quoted attributes, and proper escaping of < and & inside text. This formatter uses the browser built-in XML parser for validation, so its verdict matches what real XML tools will say.
Can I format an XML sitemap or RSS feed with this?
Yes. Paste any sitemap.xml, RSS, Atom feed, SVG file, or configuration XML. Large documents are fine too, since everything is processed locally in your browser with no upload size limits to worry about.
Sitemaps and feeds are often served minified, which makes debugging them painful. Pretty-printing reveals the structure instantly: you can spot a missing closing tag or a bad character long before a search engine or feed reader complains.
Frequently asked questions
Is this XML formatter free?
Yes. Format unlimited XML documents with no account and no limits. It runs entirely in your browser.
What does "not well-formed" mean?
It means the XML breaks basic syntax rules: mismatched tags, more than one root element, unquoted attributes, or unescaped < and & characters. The error message points at the problem.
Does it preserve CDATA sections and comments?
Yes. CDATA sections, comments, and the XML declaration are kept as-is and placed on their own lines with correct indentation.
Can I change the indentation?
Yes. Choose 2 spaces, 4 spaces, or a tab character before formatting.
Is my XML uploaded anywhere?
No. Parsing and formatting happen locally in your browser. Your data never leaves your device.