JSON Formatter & Validator
Format and validate JSON syntax — the sibling tool for JSON APIs, config files, and log payloads.
Open toolHome › Tools › Developer Tools › XML Formatter
Paste any XML to instantly format it with readable indentation or minify it to one line. Parse errors show the exact line and what went wrong. 100% in-browser — nothing leaves your device.
DOMParser API. Your data is never uploaded or stored.
XML Formatter & Validator beautifies messy or minified XML by re-indenting it with consistent two-space levels. Paste a SOAP envelope, a Maven POM, a Spring configuration, or a raw Atom feed — the tool parses it with the browser's native DOMParser, rebuilds the element tree with proper indentation, and shows parse errors with the exact line and column if the document is malformed. Minify mode strips all whitespace between tags into a single line, useful when you need the smallest payload for a request header or diff. Nothing is uploaded; all processing runs in your browser.
No — it checks that the XML is well-formed (correct tag nesting, valid attribute syntax, single root element) using the browser's native DOMParser. XSD schema validation is out of scope for this tool.
The DOMParser makes implicit namespaces explicit when rebuilding the tree. The namespace declarations were always present in your document — they're now visible in the output. The XML is correct and equivalent to the original.
The XML declaration is part of the document prolog, not the element tree. The DOMParser doesn't surface it in the DOM, so the serializer can't include it. The output starts with the root element — the content is fully preserved.
No hard limit — all processing runs in your browser. Very large documents (over 5 MB) may take a moment, but there's no server-side cap.
HTML is not XML. The tool uses the strict XML parser, which requires well-formedness — unclosed tags and bare & or < characters that browsers silently accept in HTML will cause parse errors here. Use a dedicated HTML formatter for HTML files.
Keep going
Format and validate JSON syntax — the sibling tool for JSON APIs, config files, and log payloads.
Open toolConvert JSON configs and API responses to YAML in one paste — no signup, no install.
Open toolEncode XML payloads as Base64 for API transport — or decode a Base64 string back to readable text.
Open toolTest regex patterns against XML attribute values or element content before writing schema validation code.
Open tool