XML Formatter & Validator
Make minified XML easier to read, compact formatted markup, or check whether a document is well-formed. Choose two spaces, four spaces, or tabs. The browser handles the XML locally; input is not uploaded.
Up to 1,000,000 characters. The text stays in this tab and is not uploaded.
xml:space="preserve" is set. Do not use the output for signed or byte-sensitive XML. DTDs, custom entities, and schema validation are not supported.What this tool helps with
Nested XML is difficult to inspect when it has been minified, while mismatched tags and malformed markup can be hard to find by eye. This tool uses the browser's native XML parser to check well-formedness before formatting or minifying.
How to use it
- Paste an XML document or load the built-in sample.
- Choose indentation and select Format XML, Minify XML, or Check well-formedness.
- Review the result and any limits, then copy or download it. Compare important output before replacing an original file.
Requirements
A modern browser with JavaScript, DOMParser, XMLSerializer, and Blob support. No account, external parser, server, or upload is required.
Limits and privacy
Checks XML well-formedness only; it does not validate an XSD, DTD, or application schema. DTD and custom entity declarations are rejected. Browser serialization may normalize namespace prefixes or entity spellings, and formatting may remove whitespace-only nodes between child elements unless xml:space="preserve" is set. Do not use it for signed, canonicalized, or byte-sensitive XML. Input is capped at 1,000,000 characters. The root name parsererror is reserved, and browser-specific parsererror markup inserted beneath a partially parsed root is treated as a syntax error. Inputs are processed locally in this browser. The site does not provide an upload endpoint for this tool.
Frequently asked questions
Does this validate an XML schema?
No. It checks whether the browser can parse the document as well-formed XML. XSD, DTD, and application-specific validation are not performed.
Is my XML uploaded?
No. Parsing, formatting, and minifying happen in the current browser tab. The site does not provide an XML upload endpoint.
Can I format signed or byte-sensitive XML?
No. Browser serialization may normalize prefixes, entity spellings, or whitespace. Do not use the output for XML signatures, canonicalization, or byte-for-byte comparisons.
Are DTDs and custom entities supported?
No. The tool rejects DTD and custom entity declarations and does not fetch external resources.
Step-by-step guide
How to format XML and check that it is well-formed →
Open-source project
Inspect the standalone XML demo, source, setup notes, and MIT license → · Download source ZIP