Skip to content
M2TOOLKIT

XML Formatter & Validator

Indent XML so it's readable, or minify it — and check that it's well-formed.

  • Free
  • No sign-up
  • Runs in your browser
Output

Everything you type is processed in your browser. Nothing you enter is sent to our servers or stored by us.

How to use the XML Formatter

  1. Paste your XML into the left box, or open a file.
  2. Adjust the options if you need to.
  3. Copy the formatted XML or download it as a file.

What does this tool do?

Your browser's XML parser checks that the document is well-formed (every tag closed, attributes quoted, one root element). Comments, CDATA sections and processing instructions are preserved.

Why use it?

  • Read sitemaps, feeds and SVG files.
  • Spot unclosed tags.
  • Minify XML for transport.

Well-formed vs valid

“Well-formed” means the XML follows syntax rules. “Valid” additionally means it matches a schema (XSD or DTD). This tool checks well-formedness.

Privacy

Everything you type is processed in your browser. Nothing you enter is sent to our servers or stored by us. There's no account to create and nothing to install.

Last reviewed by the M2Toolkit team.

Other tools people use alongside the xml formatter.