XML Formatter and Validator: Private, in Your Browser
Indent, minify and check XML.
Paste XML and it is laid out again as you type, with two or four spaces, tabs, or on a single line. On the way it is checked against the rules every XML file must follow: tags closed in the right order, attribute values in quotes, one root element, & and < written as entities. The first rule broken is named in plain words, with its line and column. Text is kept exactly as written: entities stay entities, CDATA stays CDATA, and an element that mixes words with tags, or asks to keep its spaces (xml:space="preserve"), is left as it came. It checks that XML is well formed, not that it matches a schema (XSD or DTD). Invoices, bank files and configuration are often XML, so this formatter does its work on your device.
How to use XML formatter
- Paste XML into the XML field, or open a text file.
- Choose an Indent of 2 or 4 spaces, Tab or Minify, and turn on Remove comments if you want them gone.
- Press Copy result, or Download the formatted XML.
XML formatter: common questions
Is my XML uploaded when I format it online?
No. The XML formatter checks and lays out the XML in your browser, on your device, so invoices, bank files and configuration are never uploaded. It works offline too.
Does the XML formatter validate against an XSD or DTD schema?
No. The XML formatter checks that XML is well formed (tags closed in order, quoted attribute values, one root element, & and < written as entities), not that it matches an XSD or DTD. The first broken rule is named with its line and column.
Does formatting XML change text, entities or CDATA?
No. The XML formatter keeps text exactly as written: entities stay entities, CDATA stays CDATA, and an element that mixes words with tags or has xml:space="preserve" is left as it came.
Everything stays on your device. Nothing is uploaded. Works offline once your first visit has stored the app.