XML Formatter
The XML formatter re-indents an XML document with consistent nesting, keeping attributes, CDATA sections and comments intact. It reports parse errors with their position so malformed documents are easy to fix.
Your result will appear here.
Not sure where to start? Use Load example.
Results update automatically and are calculated on your device. Nothing you type is sent to a server.
Runs in your browser. Processing happens entirely in your browser. Nothing you enter is sent to Delimiter.live.
How to use the XML Formatter
- Paste an XML document, an SVG file or any XML-based format.
- Choose an indent width.
- Copy or download the formatted document.
Example
<a><b>1</b></a>
<a> <b>1</b> </a>
Common use cases
- Reading a minified SOAP response or a compressed configuration file.
- Tidying a hand-written XML document before committing it.
- Inspecting an SVG file to find the element you need to edit.
Limitations and things to watch for
- Whitespace inside mixed content — text and elements in the same parent — is significant in XML, so those elements are left on one line rather than being re-indented and altered.
- The XML declaration, comments, processing instructions and CDATA sections are preserved as written.
- Parsing uses the browser DOMParser, which never resolves external entities or fetches DTDs.