XML Formatter
Beautify, validate or minify XML.
How to use
- 1Paste your XML into the box.
- 2Choose 2 spaces, 4 spaces, tabs or minify.
- 3Fix any error shown with its line and column.
- 4Copy the result or download it as a file.
Frequently asked questions
Does it check that my XML is valid?
It checks that the XML is well-formed: tags are closed and nested correctly and attributes are quoted. It doesn't validate against an XSD schema.
Is my XML uploaded?
No. Formatting uses your browser's built-in XML parser; nothing is sent anywhere.
Are comments and CDATA kept?
Yes. Comments, CDATA sections and processing instructions are kept in the output.
What does minify do?
It removes all indentation and line breaks between tags, making the file as small as possible.
You may also need
SQL Formatter
Format SQL queries for any database.
YAML ⇄ JSON Converter
Convert YAML to JSON and back.
JSON to TypeScript
Generate TypeScript interfaces from JSON.
HTML Entity Encoder
Escape and unescape HTML entities.
Number Base Converter
Binary, octal, decimal, hex and any base.
Cron Expression Explainer
Cron schedules in plain English with next runs.