XML Formatter & Validator
Pretty-print XML so it's easy to read, find errors with the exact line, or minify it to save space.
- Free & unlimited
- No sign-up
- Instant results
How to use XML Formatter
- Paste XML or open a file (XML, SVG, RSS, sitemap…).
- Pick beautify or minify, indent size and whether to keep comments.
- Copy the result or download it.
Validation
Your browser's XML parser reads the document first. If a tag isn't closed, an attribute isn't quoted or there's a stray &, you get the line and column of the problem instead of a broken result.
What is kept
- The XML declaration and DOCTYPE.
- Text exactly as written, including mixed content like
<p>Hello <b>world</b></p>. - CDATA sections, processing instructions and (optionally) comments.
- Attribute order and namespaces.
Frequently asked questions
Can it format SVG, RSS or sitemaps?
Yes, they are all XML.
Does it check against a schema (XSD)?
No, it checks that the XML is well-formed, not that it matches a schema.
Can it convert XML to JSON?
Not yet. Try our YAML and JSON tools for config files.
Is my file uploaded?
No, it is processed in your browser.
Related tools
JSON Formatter & Validator
Format, validate and minify JSON with clear error messages.
SQL Formatter
Beautify or minify SQL queries online.
Code Beautifier
Format HTML, CSS, JavaScript, JSON, YAML and Markdown.
YAML to JSON Converter
Convert YAML files to JSON.
More Developer Tools
JSON to CSV Converter
Convert a JSON array to CSV for Excel or Google Sheets.
CSV to JSON Converter
Convert CSV or Excel data into a JSON array.
Base64 Encode & Decode
Encode text to Base64 or decode Base64, UTF-8 safe.
URL Encode & Decode
Percent-encode or decode URLs and split them into parts.
UUID Generator
Generate random v4 or time-ordered v7 UUIDs in bulk.
JWT Decoder
Decode a JSON Web Token and check when it expires.
Hash Generator
MD5, SHA-1, SHA-256 and SHA-512 hashes for text or files.
HTML Entity Encoder & Decoder
Escape < > & " for HTML, or decode & style entities.