XML formatter

Paste XML and get it pretty-printed with nested indentation — or stripped of whitespace into one compact line.

Paste XML and get it pretty-printed with nested indentation — or stripped of whitespace into one compact line.

How to use

  1. Paste the XML document
  2. Choose Pretty-print or Minify
  3. Copy the result

Frequently asked questions

Will it fix broken XML?

No — the document must be well-formed. If a tag is unclosed you'll get an error pointing at the problem.

Does it preserve attributes and CDATA?

Yes, content is unchanged — only inter-tag whitespace is affected.

Is my XML uploaded?

No, processing happens in the browser.