Category: Developer tools
XML Formatter
Format, minify and validate XML locally
Paste XML and get it indented or minified, with parser errors reported line by line. The whole thing runs in your browser, so feeds and configs stay private.
Paste XML to format or minify it.
The result will appear here.
Everything on this page is processed in your browser. Nothing is uploaded.
What this tool does
Machine-generated XML usually arrives as one long line, which makes an API response, an RSS feed, a sitemap or an SVG almost impossible to read. This formatter parses the document with the browser's own XML parser, then re-prints it with the indentation you choose, keeping attributes, comments, CDATA sections and processing instructions intact. Minify does the reverse and strips the whitespace between elements again. Because the parser is the browser's, a malformed document is reported with the same message and position the browser would use.
How to use it
- Paste your XML into the input box, or load the example.
- Pick Format with 2 or 4 space indentation, or pick Minify.
- Copy the result, or fix the reported error and try again.
Privacy
This tool runs entirely in your browser. Your input is never uploaded, stored or shared — closing the tab removes it.
Frequently asked questions
- Is my XML uploaded anywhere?
- No. The document is parsed and re-printed by JavaScript running in the page, so API payloads and configuration files never leave your device.
- Can it format an RSS feed, a sitemap or an SVG?
- Yes. All three are XML documents, so they are indented like any other file, with namespaces and attributes preserved.
- Why does my document fail to parse?
- XML is stricter than HTML: every tag must be closed, attribute values must be quoted, and a bare & is invalid. The error message shows where the parser stopped.