XML Formatter & Validator
Pretty-print, minify and check XML for well-formedness — right in your browser.
- Runs in your browser — nothing uploaded
- Instant, no waiting in a queue
- Free, no watermark, no daily limits
Paste XML, SVG, RSS, a sitemap or a config file and it is parsed by your browser’s real XML parser. Well-formed XML can be re-indented with 2 spaces, 4 spaces or tabs or minified; malformed XML shows the parser’s error with its line and column. Comments, CDATA sections, processing instructions and the XML declaration are preserved.
How to Format XML Online
- 1
Paste your XML
Paste XML into the input box or open a file. It is checked for well-formedness instantly.
- 2
Choose indentation
Pick 2 spaces, 4 spaces or tabs.
- 3
Format or minify
Click Format or Minify, then copy or save the output.
Why use ToolzBank XML Formatter?
- Validates well-formedness with the browser’s XML parser
- Error messages with line and column
- Pretty-print with spaces or tabs
- Minify XML
- Keeps comments, CDATA and XML declaration
- Works with SVG, RSS, sitemaps and config files
Frequently asked questions
Does this validate XML against a schema (XSD)?
Will formatting change my data?
Is my XML uploaded?
More free developer tools
JSON Formatter & Validator
Beautify, minify & validate JSON
JSON to CSV
Flatten JSON arrays into CSV/Excel
JWT Decoder
Decode & verify JSON Web Tokens locally
Regex Tester
Test regular expressions live
Timestamp Converter
Unix epoch ⇄ human-readable dates
Diff Checker
Compare two texts line by line
Base64 Encoder / Decoder
Encode & decode Base64 text and files
URL Encoder / Decoder
Percent-encode, decode & parse URLs
HTML, CSS & JS Formatter
Beautify HTML, CSS & JS; minify HTML & CSS
Hash Generator
MD5, SHA-1, SHA-256 & SHA-512 for text or files
Number Base Converter
Binary, octal, decimal & hex conversion
PX to REM Converter
Convert px ⇄ rem, or a whole stylesheet
Color Converter
HEX, RGB, HSL, HSV & CMYK with contrast check
YAML to JSON Converter
Convert YAML ⇄ JSON with error lines
SQL Formatter
Beautify SQL for MySQL, PostgreSQL & more
Markdown Editor
Write visually, download a .md file
From Our Blog
How to Format and Validate XML Online (Pretty Print or Minify)
Make one-line XML readable, find the exact line of a syntax error, or minify XML — for sitemaps, RSS feeds, SVG and config files.
How to Beautify and Minify HTML, CSS and JavaScript Code
When to beautify code and when to minify it, what each really changes, and how to format HTML, CSS and JavaScript or shrink HTML and CSS in one click.
