XML Formatter & Well-Formness Check
Re-indent structure, never rewrite text
Free forever — no sign-up, nothing uploaded. Files never leave your device.
XML Formatter & Well-Formness Check
Re-indent structure, never rewrite text
Drop your file here
or browse from your device
Browse filesdocument.pdf
1.2 MB
report.pdf
860 KB
100% private
Nothing is uploaded — everything runs in your browser.
Free forever
No account or payment required.
No sign-up
Open the tool and start using it right away.
Local processing
Processing time depends on your input and device.
About this tool
Beautify or minify XML with a real well-formedness check: one root element, quoted attributes, no duplicates, matched tags and legal entity references, with the line and column of any problem. Text, pre blocks and CDATA are reproduced byte for byte, and both modes reach the same verdict.
The XML Formatter re-indents the structure of a document and minifies it back down, and it checks well-formedness while it does. The parser reads quoted attribute values as single units, so a > inside an attribute is just a character, and a DOCTYPE with an internal subset of entity declarations is read whole rather than cut off at the first bracket.
What it will not do is rewrite your text. An element whose children are all elements gets indented; anything holding text, including pre blocks, mixed content and CDATA, is reproduced byte for byte, because that text is the data and re-flowing it would change the document. Well-formedness is also not validity: this page checks that names, quoting, references, comments and nesting are legal, and it does not check your document against a DTD or an XSD.
Parsing happens in your browser. SOAP envelopes, SVG files and configuration manifests routinely carry internal hostnames and identifiers, and none of it is uploaded.
Key features
Everything you get with XML Formatter & Well-Formness Check — no premium upsell.
Real well-formedness checking: element and attribute names, quoted attribute values, duplicate attributes, exactly one root element, matched tags and legal entity references
The same verdict in both modes — Format and Minify cannot contradict each other about one document
Structure is re-indented while text is left alone: pre blocks, mixed content and CDATA come out byte for byte
Indentation with 1, 2 or 4 spaces or a real tab character
Comments are kept by default, because deleting them should be your decision rather than the default
Errors report a line and a column
Copy to the clipboard or download as a .xml file
Everything runs in your browser, so no XML is ever uploaded
How to use XML Formatter & Well-Formness Check
Follow the steps below to use the tool.
- 1
Paste Your XML
Put minified or badly indented XML in the input box. Nothing is pre-filled, so what you see is only ever your own document.
- 2
Pick Format or Minify
Format re-indents the structure and leaves text alone. Minify removes the whitespace between elements and keeps the text. Both run the same well-formedness check, so switching between them never changes the verdict about your document.
- 3
Read the Result Panel
A Well-formed badge means the document checked out and the element, comment and nesting counts are below it. Not well-formed names the problem and gives its line and column. Nothing was changed either way if the badge is not green.
- 4
Copy or Download
Take the result from the clipboard, or download it as formatted.xml.
Still free, still private — your files never leave your device.
Launch XML Formatter & Well-Formness CheckFrequently asked questions
Quick answers before you launch the tool.
Related tools
Saved you searching — here are similar utilities.