Code Tower · room 23

XML Formatter

Pretty-print, minify and validate XML.

🔒 Processed in your browser · No upload · No sign-up

Format, validate and minify XML

Paste XML — a SOAP response, a Maven pom.xml, an Android layout, an SVG or a sitemap — to indent it consistently, or minify it to save bytes. The document is validated first, and errors such as unclosed tags or mismatched elements are reported with the line and column.

Does formatting change my data?

Only whitespace between elements is changed. Text content, attributes, CDATA sections, processing instructions and (optionally) comments are preserved exactly. Elements that contain mixed text are kept on one line so no meaningful whitespace is added.