What is XML?
An XML formatter (beautifier) re-indents XML with consistent nesting and line breaks so it is easy to read and debug. XML (eXtensible Markup Language) is used for configuration, SOAP web services, RSS feeds, SVG and office document formats. Messy or single-line XML becomes a clean, hierarchical structure. This tool formats XML instantly and privately in your browser.
Runs locally: your XML is formatted in your browser; nothing is uploaded.
How XML works
Formatting parses and re-serializes the XML with indentation:
- The XML is parsed into its element tree.
- It is written back out with each level indented and elements on their own lines.
- The result is readable, hierarchical XML that is identical in meaning.
How to use
- Paste your XML into the input box.
- The tool processes it instantly in your browser.
- Copy the result.
Options explained
- Indent size — Choose the number of spaces used for each level of nesting.
- Auto Update — Formats as you type.
Common uses
- Reading SOAP, RSS and configuration files.
- Debugging API responses that return XML.
- Tidying SVG and other XML-based formats.
Frequently asked questions
Does formatting change my XML?
No. It only adds indentation and line breaks; the data and structure stay the same.
What if my XML is not well-formed?
Formatting needs well-formed XML; use the XML Validator to find the problem first.
How do I shrink XML?
Use the XML Minifier to remove whitespace.