XML formatter and validator
Check that XML is well-formed, find the line of an error, and pretty-print or minify it with 2, 3, 4 spaces or tabs.
- Runs in your browser
- No upload
- Result stays on your device
Privacy & limitsRuns in your browser. Nothing is uploaded.
Input content stays in this tab; Refentra does not upload or store it. Optional aggregate action counts are sent only with your usage consent. Clear the workspace when finished.
Supported profile: UTF-8 XML: one document root; namespaces checked. No DTD or custom entities. Mixed text retained; 100,000 UTF-16 units, 20,000 nodes, depth 64. XML 1.0 character bounds; 1.0/1.1 declarations accepted within this profile. Files: UTF-8 only; an optional UTF-8 BOM is removed on import. Error offsets refer to editor UTF-16 units. Structure after parsing
Files: UTF-8 only; an optional UTF-8 BOM is removed on import. Error offsets refer to editor UTF-16 units.
Maximum text: 200,000 UTF-16 units; parser limits can be smaller. Worker time limit: 15 seconds (regex 1.5 seconds).
Check the input and the result
- Prepare and choose the operation
Paste an XML document and choose whether to format or minify it. Choose an indentation only when you are formatting.
- Check a concrete example
Use this sample and compare the indicated result: <root><item>1</item></root> → format → <root> <item>1</item> </root>
- Check the output before you reuse it
Check element names, attributes and text together. Text mixed in around child elements must keep its meaning.
Answers for this task
Does valid XML prove the document is correct?
A well-formedness check confirms that the syntax matches up. It doesn't establish XSD validity, business-rule validity or namespace validity.
What should I check if the input fails?
Match every opening and closing tag, put attribute values in quotes, and write a literal ampersand as &. Remove declarations the tool doesn't support.
Where does this tool stop?
The limited parser doesn't fetch external entities or validate DTDs, so don't use this formatter as an XML security audit.