iLoveMyFile

XML Formatter

Format and validate XML with clean indentation, or minify it. Errors are reported with a line number.

Input

Paste XML above, or upload an .xml file.

How to use XML Formatter

  1. Paste your XML or upload a file.
  2. Click Format XML to indent it, or Minify to remove the spacing.
  3. Copy the result or download it.

Frequently asked questions

Does it check that my XML is valid?

Yes. It checks that the XML is well-formed — every tag closed, properly nested, one root element, quoted attributes — and reports the line of the first problem. It does not check the XML against a schema (XSD or DTD).

Does formatting change my data?

No. Only the spacing between tags changes. Text inside a tag, and any element that mixes text with other tags, is left exactly as it was.

Can it format SVG, RSS or sitemap files?

Yes. They are all XML and work the same way.

Is my text uploaded to a server?

No. This tool runs entirely in your browser, so what you paste never leaves your device.