XML Formatter
Format or minify XML
Input
Result
Read-only
What is XML Formatter?
XML Formatter makes XML strings easier to read. You can indent with spaces or tabs, or remove line breaks and extra whitespace to minify the document to a single line.
Use it to review XML in API responses or configuration files. The result appears as soon as you paste the XML.
How to Use
Enter an XML string and the formatted result appears. Choose the indentation style and, when using spaces, the width.
Main Settings
Indent
Choose spaces or tabs to match your team's convention, or None to put the document on one line. Minifying also removes extra whitespace between elements.
Indent Spaces
When Indent is set to spaces, choose a width of 2, 4, 6, or 8. Wider spacing makes deeply nested XML easier to follow.
Use Cases
- Making API XML responses easier to inspect
- Reviewing the structure of XML configuration data
- Preparing formatted XML for sharing or review
- Compressing XML into a single line when needed
Things to Keep in Mind
- In XML where whitespace is significant, whitespace-only element content is also collapsed
How was your experience?
Last updated:

