XML formatter and validator
Pretty-print, validate or minify XML with error positions.
About this tool
This tool pretty-prints XML with consistent indentation, checks that it is well-formed, and can minify it to one line. If a tag is unclosed or mismatched, it shows the line and column and the tag it expected. It works for sitemaps, RSS feeds, SOAP messages, SVG and config files.
At a glance
- What it does
- Pretty-print, validate or minify XML with error positions.
- Price
- Free, no sign-up
- Works in
- Your browser, on phone or computer. Works offline after the first visit.
- Privacy
- What you type never leaves your device.
How to format XML
- Paste your XML or open an .xml file.
- Pick 2 spaces, 4 spaces, tabs or Minify, and whether to remove comments.
- Copy or download the result. Errors point to the line and column.
Private
Your text stays in your browser and is never sent to a server.
Instant
Results update as you type, with nothing to install.
Free
No sign-up, no limits and no ads inside your writing space.
Frequently asked questions
How do I find an error in a large XML file?
Paste it here. The tool names the line and column of the first problem, for example "expected </item> (opened at line 12) but found </items>", and "Show line" selects it in the input.
What does "well-formed" mean?
Well-formed XML has exactly one root element, every tag closed in the right order, quoted attribute values and escaped special characters such as & and <. This tool checks those rules; it does not validate against an XSD schema.
Does formatting change my data?
No. Only whitespace between tags changes. Text inside elements, attributes, CDATA sections and comments are kept (unless you choose to remove comments).
Is my text sent anywhere?
No. Everything runs in your browser and your text never leaves your device. Nothing is stored on any server.



