Skip to main content
${format:vault}

XML Formatter

Input
Tab inserts an indent. Press Escape, then Tab, to move focus out of the editor.
Output

Why use a private XML formatter?

XML is still the wire format for a huge amount of enterprise software — SOAP APIs, Maven POM files, Android manifests, SVG, Office Open XML, and countless config systems. Pasting these into an online formatter means sending potentially sensitive payloads — API responses, credentials in config attributes, internal service addresses — to a third-party server.

formatvault formats and validates XML entirely inside your browser using fast-xml-parser. Nothing is transmitted. The network tab will show zero outbound requests while you work.

How it works

Your XML is parsed into an in-memory tree using fast-xml-parser, then re-serialized with consistent indentation. Attributes, CDATA sections, and comments are preserved through the round-trip. The XMLValidator checks well-formedness before formatting so you get a precise error with line and column numbers before any output is produced.

Minify mode strips all non-significant whitespace for smaller payloads. Validate mode checks only well-formedness without modifying the input — useful as a quick sanity check before committing a config file.

Common use cases

  • Formatting SOAP request/response bodies from API testing tools
  • Validating Android AndroidManifest.xml and layout files before building
  • Pretty-printing Maven pom.xml files with deeply nested dependency trees
  • Debugging minified XML payloads from enterprise integrations (SAP, Salesforce)
  • Formatting SVG files exported from Figma or Illustrator for readability
  • Normalising Office Open XML (.docx/.xlsx internals) for inspection
  • Minifying XML config files before bundling into a deployment artifact
  • Checking well-formedness of RSS or Atom feed XML

Frequently asked questions

Is it safe to format XML that contains sensitive data?
Yes. All processing happens in your browser using fast-xml-parser — your XML is never sent to any server. You can verify this by opening DevTools → Network and observing zero outbound requests when you format.
What does "validate" check?
The validator checks that your XML is well-formed: proper tag nesting, closed tags, valid attribute syntax, and legal character encoding. It does not validate against an XSD or DTD schema — that would require a schema file.
Does the formatter preserve comments and CDATA sections?
Yes. Comments and CDATA sections are preserved through the parse-and-rebuild cycle. Attributes are also preserved with their original values.
What is the difference between formatting and minifying?
Formatting adds consistent indentation and newlines to make the XML human-readable. Minifying removes all non-significant whitespace to produce the smallest possible output, useful for reducing payload sizes.
Does it work offline?
Yes, once the page has loaded. The fast-xml-parser library is bundled with the app and requires no network access to format or validate XML.

Related tools