XML Formatter
Format XML strings
Features
Choose from 4 indent widths
Specify from 2 spaces, 4 spaces, tab, or minify
Three text formatting modes
Switch between trim, normalize, and whitespace removal
Bulk-remove unneeded comments
Strip unneeded comments to simplify the output
Supports copy and download
Save the formatted result as an XML file
How to use
Paste the XML code into the input field
Enter the target string into the XML code field to format
Select the indent width
Specify the output format from 2 spaces, 4 spaces, tab, or minify
Fine-tune text formatting
Optionally set trim, normalize, whitespace removal, and comment removal
Show the result with the format button
Pressing the button displays the formatted code on the right, ready to copy or save
Use cases
Improving the readability of config files
Tidy up XML configs with no line breaks to make them readable and ease maintenance
Checking API responses
Format XML data returned on a single line to grasp its structure visually
Compressing XML for transfer
Use minify mode to strip whitespace and reduce traffic and size
Standardizing document layout
Align the indent width to standardize the appearance of shared XML
Safety and privacy
Runs entirely in your browser
Your input data is processed only within your browser and is never sent externally.
Processing only in your browser
Formatting XML is processed entirely within your browser, and input data is not sent to any server.
Communications encrypted with HTTPS
Page loading is also encrypted by TLS, and content cannot be read by third parties.
No transmission to third parties
Input content is not sent to external services such as ad networks or trackers.
No automatic saving of results
Formatted results and input suggestions are not stored on the server.