📋

XML Formatter

Format, validate & minify XML

Input XML
Output

About XML Formatter

Raw XML — especially from SOAP responses, auto-generated serialisers, or export tools — is often a wall of text. The formatter adds indentation so the tag hierarchy is visible. It also validates: unclosed tags, mismatched attribute quotes, and encoding issues are caught and reported with the exact location of the problem. Works with any XML-based format: SOAP envelopes, RSS/Atom feeds, SVG, Maven POM files, Android manifests, Spring config, and more. Minify strips whitespace when you need compact output.

Common Use Cases

  • Reading SOAP API responses when debugging integrations
  • Validating XML config files before deployment
  • Cleaning up auto-generated XML from serialisation libraries
  • Minifying SVG files exported from design tools

Frequently Asked Questions

XML vs JSON — when is XML still used?+
XML is common in enterprise systems, SOAP web services, configuration files (Maven, Spring, Android), RSS/Atom feeds, SVG, and Office document formats. JSON has replaced it for most APIs, but XML is far from gone.
Can I format SVG with this?+
Yes. SVG is valid XML. Useful for cleaning up files exported from Figma or Illustrator.
Are namespaces preserved?+
Yes. xmlns declarations are kept exactly as they appear — only whitespace and indentation change.
What encoding is supported?+
UTF-8, which covers the vast majority of real-world XML. If your document declares a different encoding, the browser may handle it automatically.