XML formatter and validator
Paste XML to indent it neatly, check that it’s well-formed, or compress it to a single line.
Sealed on this device
Runs in your browser. Nothing is uploaded.
Sealed
Result
Your formatted XML will appear here as you type.
This XML isn’t well-formed
How it works
-
Paste your XML
Paste a document, an API response, an SVG or an RSS feed, or open a file from your device.
-
Check the structure
The XML is checked as you type. If a tag is broken, you see the line, the column and what to change.
-
Copy the result
Choose the indentation, keep or remove comments, or minify it, then copy or download the file.
Frequently asked questions
Is my XML uploaded anywhere?
No. Checking and formatting both happen in your browser. Your document never leaves your device, which matters for configuration files and data exports.
What does “well-formed” mean?
A well-formed document follows XML’s basic grammar: one root element, every tag closed in the right order, quoted attribute values and escaped special characters. It doesn’t mean the document matches a particular schema (XSD or DTD), which this tool doesn’t check.
Does formatting change my data?
Only whitespace between tags changes. Element names, attributes, text and CDATA sections stay as they are. If whitespace inside text matters to you, keep “Keep short text on one line” turned on.
Can I format SVG, RSS or Android layout files?
Yes. They are all XML, so any well-formed SVG, RSS or Atom feed, sitemap, Maven POM or Android resource file can be formatted and minified here.
Why is minifying useful?
Removing indentation and line breaks makes the file smaller, which helps when XML is embedded in code, sent over a network or stored in a database field.