No Signup Required

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. 1

    Paste your XML

    Paste XML into the input box or open a file. It is checked for well-formedness instantly.

  2. 2

    Choose indentation

    Pick 2 spaces, 4 spaces or tabs.

  3. 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)?
No. It checks that XML is well-formed — properly nested and closed tags, quoted attributes, escaped characters — but it does not validate against an XSD or DTD.
Will formatting change my data?
Formatting only changes whitespace between tags. Text content is trimmed of surrounding whitespace, so if exact whitespace inside elements matters (for example in xml:space="preserve" content), check the output.
Is my XML uploaded?
No. The tool runs entirely in your browser — nothing you paste is sent to a server.

More free developer tools