XML Formatter

Uses a real XML parser to catch mismatched tags before formatting. Choose 2, 4, or 8-space indentation and copy the result.

Developer Tools Formatting Runs locally No sign-up

XML formatter & validator

Input size —
Output size —
Saved —
Examples

The document is validated before formatting: mismatched tags, multiple root elements, and text outside the root are reported with a line and column and are never reformatted.

About XML Formatter

Validate and pretty-print XML with configurable indentation, or minify it for transport.

This tool runs locally in your browser. It does not upload your input, require an account, or store your data on a server. If a feature needs a network request, the interface asks before sending anything.

xml formatterxml validatorxml minifypretty print xml

Search tools

↑ ↓ navigate Enter open Esc close