XML Formatter
Paste XML to format it with clean indentation, minify it, or validate that it is well-formed. Runs locally.
Input
LocalOutput
—About XML Formatter
The XML Formatter indents XML into a readable tree, can minify it back to a compact form, and checks that it is well-formed. It is for developers working with configuration files, SOAP payloads, RSS feeds, or any XML-based data format.
Raw XML from an API or export is often one dense block. Formatting it locally makes the structure legible and flags malformed markup, without sending the document to an external service.
Step by step
- Paste your XML into the input area.
- The formatter re-indents the elements to show the hierarchy.
- Switch to minify if you need a compact single-line version instead.
- If the XML is not well-formed, read the error to locate the problem.
- Copy the result or download it.
What it offers
- Indented formatting and minification
- Well-formedness checking
- Clear error reporting
- Runs entirely in the browser
Where it helps
- Reading SOAP or other XML API responses while debugging
- Tidying configuration and build files for review
- Inspecting RSS or Atom feed structure
- Preparing XML fixtures for tests
Tips for best results
- Well-formed is not the same as valid — this checks syntax, not conformance to a schema or DTD.
- Minify XML for transport but keep an indented copy for editing.
- Watch for unescaped ampersands and angle brackets in text content, a frequent cause of parse errors.
Why people use it
Readable hierarchy
Indentation exposes nesting and mismatched tags.
Two directions
Format for reading or minify for transport.
Catches errors
Well-formedness checks surface broken markup.
Private
Your XML stays in the browser.
Common questions
This runs entirely in your browser
No file or text you enter here is uploaded. Encoding and decoding happen on your device using native browser APIs — close the tab and nothing remains on a server.