Free · no sign-up · runs entirely in your browser
XML Formatter & Validator
Beautify, minify and error-check any XML in one paste — SOAP envelopes, RSS feeds, sitemaps, config files. Nothing is uploaded, ever.
Format, minify or validate your XML
Output refreshes as you type. Files are read locally with the FileReader API.
Paste, drop or open a file (≤ 5 MB). Everything stays on this device.
Formatted XML appears here.
How it works
Three steps, all local to this tab.
Paste into the box, drag a .xml file onto it, or use the file picker. Files are read with FileReader and never leave your device.
The browser's strict XML parser confirms well-formedness and reports the first error with a best-effort line and column.
Beautified or minified markup lands in the output pane with line numbers — copy it back, or grab a .xml file.
Built for real payloads
SOAP, RSS, sitemaps, SVG, config — the awkward parts are handled.
A character-level tokenizer keeps prefixes, CDATA blocks, processing instructions and internal DTD subsets exactly as written — no innerHTML round-trip to mangle them.
Strip comments for a lean diff, or sort attributes alphabetically so two serializations of the same data line up.
Under 200 KB formats on a 120 ms typing pause; bigger files are deferred to an idle callback with a progress note, and anything over 5 MB is refused instead of hanging the tab.
Frequently asked questions
Is my XML uploaded anywhere?
No. Parsing, formatting and statistics all run in your browser with standard Web APIs. The page makes no network requests after it loads.
What counts as well-formed XML?
Exactly one root element, properly nested and closed tags, quoted attribute values, and one of the five predefined entities wherever & appears. The DOS/Windows BOM at the start of a file is stripped automatically.
Does it validate against a schema?
It checks well-formedness, not XSD or DTD validity — that needs the schema, and shipping one to a server would break the privacy promise. Schema errors still show up as parse failures when the document is structurally broken.
Will minify change my data?
It only removes whitespace between tags that has no text content, and optionally comments. Text inside elements, CDATA sections and attribute values is left byte-for-byte identical.
Can I format JSON or HTML instead?
HTML that is not valid XML (unclosed <br>, unquoted attributes) will report a parse error, and JSON has no tags so you get the "does not look like XML" warning. Both keep your input untouched.