Developer Tools

XML Formatter & Beautifier

Pretty-print messy or minified XML with clean indentation. Makes XML sitemaps, feeds and configs readable in one click.

Tool

About the XML Formatter

The XML Formatter runs entirely in your browser — your data never leaves your machine. Paste, click and copy the result.

Minified XML is efficient for machines but impossible for humans. This beautifier re-indents every element so nested structure is obvious — ideal for inspecting sitemaps, RSS feeds, SOAP responses and configuration files.

How to use this tool

  1. Paste the XML you want to beautify.
  2. Choose two spaces, four spaces or tabs for indentation.
  3. Click Format XML and copy the readable result.

What it does

  • Adds a new line and indentation for every element.
  • Aligns closing tags with their opening tag.
  • Keeps self-closing tags, attributes and text on one line.

Developer tip

The formatter changes whitespace only — it never rewrites tags or values, so the output is safe to paste back into a build or config.

Who is this tool for?

Anyone debugging an XML feed, editing a sitemap, or reviewing an API response that arrives on a single line.

Frequently asked questions

No. Only whitespace between tags is changed; tags, attributes and values are left untouched.
Yes. Even a single-line document is expanded into a fully indented tree.
Two spaces is the common convention; tabs are useful if your editor is configured for them.

Related tools

Guides for this tool