XML Formatter, Validator & Beautifier
Paste XML, get pretty-printed output or minified one-line output. Errors are highlighted with the parser's position. Runs entirely in your browser.
Why format XML?
XML is still everywhere in business systems — SOAP web services, RSS / Atom feeds, sitemaps, configuration files, Word and Excel documents (which are XML under the hood), Java Maven and .NET project files. APIs that return XML often serve it as one long minified string for transmission; reading it requires beautification first. This tool pretty-prints any XML with correct nested indentation.
What gets validated
The browser's built-in DOMParser is used to validate XML. It catches:
- Mismatched tags (
<a>...</b>). - Missing closing tags.
- Invalid character encoding.
- Malformed entity references.
- Invalid characters in attribute values.
What it doesn't validate: schema conformance (against DTD or XSD). For that you need a dedicated XML schema validator.
Format vs minify
Beautify when you're reading XML yourself. Minify when XML is going over a network or into a database where size matters. Minified XML is the same data with all extraneous whitespace removed; it's the format APIs serve in production.
Common XML use cases
- SOAP API debugging — every SOAP envelope is XML.
- Sitemap inspection — XML sitemaps need correct format for search engines to consume.
- RSS / Atom feed editing.
- Word / Excel / PowerPoint open XML — these are zip files of XML; you can unzip and edit.
- Maven pom.xml / NuGet .nuspec / .csproj editing.
- Android resource files (strings.xml, layouts).
- Spring Boot / Java config XML.
- Apple plist files (XML format).
Tips
- Strip XML declaration before pasting if it causes errors — sometimes a copy includes a BOM or encoding declaration that the browser parser rejects.
- Comments are preserved in both beautify and minify modes.
- CDATA sections are preserved exactly — their content isn't reformatted.
- Namespaces survive formatting — xmlns declarations are kept.
FAQs
Is anything uploaded?
No. Parsing runs in your browser via DOMParser.
Does it validate against an XSD schema?
No — well-formedness only. For schema validation use a dedicated XSD tool.
Can it handle huge XML files?
Practical limit ~10 MB. Beyond that, browser performance degrades.