Free tool

XML formatter, beautify, minify, check.

Paste XML or drop a file to indent it neatly with 2 spaces, 4 spaces or tabs, squash it onto one line, or just check it. Mistakes like a missing closing tag are found by your browser's own XML parser and shown with the line and column. Comments, CDATA and the XML declaration are kept. Copy or download the result; nothing is uploaded.

Formatted in your browser. Your XML is never uploaded.

Clean XML

Readable, small or checked.

01 / Format

Indented by level

Each element on its own line, indented by depth; short text stays on one line with its tags.

02 / Minify

Smallest size

Spaces between tags removed, for sending or storing.

03 / Check

Real parser

Your browser's XML parser reports the first mistake with its line and column.

Questions

Good to know.

How do I format XML?

Paste it and press Format, or just paste: it formats as you type.

How do I find an error in my XML?

Press Check. The status line shows the first error with its line and column.

Does it keep comments and CDATA?

Yes, and the XML declaration at the top.

Can it format SVG, RSS or plist files?

Yes, any well-formed XML.

Is my file uploaded?

No.