XML Formatter and Adjuster
Paste your XML below to format, minify or check the syntax (well-formedness).
Paste your XML below to format, minify or check the syntax (well-formedness).
XML (eXtensible Markup Language) is a markup format used to structure data hierarchically and readably — present in configuration files, feeds (RSS/Atom), Office documents, SOAP, sitemaps and legacy integrations between systems. Unlike JSON, XML describes structure through tags and attributes, and allows text content to be mixed with elements.
This tool processes the XML entirely in your browser, with its own parser (it doesn't use
the browser's DOMParser), offering three main operations:
Elements with mixed content (text and tags in the same element, such as
<p>Hello <b>world</b>!</p>) are not reindented
internally — adding line breaks in that case would change the original text, so the
tool preserves that piece exactly as it is.
No. This tool only checks whether the document is well-formed — tags correctly opened/closed, valid attributes, a single root element, etc. It doesn't validate the semantic structure against an XSD or DTD schema (that would require loading and interpreting a separate schema file, outside the scope of this tool).
No. If the document has a <!DOCTYPE ...> declaration — including
one with an internal subset defining custom entities — it's preserved as opaque text
between the XML declaration and the root element, but it is not processed.
Expanding DOCTYPE entities is a classic attack surface (XXE) and was
deliberately left out of scope for this tool.
The five basic XML entities (<, >,
&, ", ') and numeric
entities (A or A). Any other named entity
(which would require a DOCTYPE to be resolved) is reported as an error.
It indicates that the text doesn't follow the structural rules of XML — for example, an opening tag without its matching closing tag, more than one root element in the document, an unquoted attribute, or unclosed attribute quotes.