XML Formatter
Pretty-print and indent messy XML so it is readable, or minify it back to one line. Runs in your browser, nothing uploaded.
Readable XML in one click
Paste a wall of XML and this formatter walks the tags, opening a new indented line for each element and closing it back out, so the structure is obvious at a glance. A simple element that wraps a bit of text, like a title tag, is kept on one line so the result stays compact. Switch to Minify to strip the whitespace back out for transport. Your browser also runs a real well-formed check on the side, so you get a nudge if a tag is unclosed or mismatched, while valid text that contains an angle bracket is left alone. It all happens in your browser.
For the configs and payloads you keep reopening
That one XML config or API response always comes back around. Relic keeps an end-to-end encrypted, searchable history of everything you copy, on every device, for as long as you want it. The formatter is free, and the snippet you just cleaned up is one search away the next time you need it.
Frequently asked questions
How do I format XML?
Paste your raw XML into the input box and the formatter pretty-prints it instantly, giving each element its own indented line so the nesting is easy to read. Pick a 2 or 4 space indent, or switch to Minify to strip the whitespace back out into a single line. Everything happens live in your browser as you type.
How does the formatter decide where to indent?
It walks the tags in order, adding a level of indentation each time an element opens and removing one when it closes. A simple element that just wraps a bit of text, like a title tag around a single value, is kept on one line so the output stays compact. Self-closing tags and declarations do not change the depth.
What makes XML well-formed?
Well-formed XML has exactly one root element, every open tag has a matching close tag (or is self-closed), tags nest without overlapping, and attribute values are quoted. This tool runs a real well-formedness check in your browser using the built-in DOMParser, so you get a "Well-formed" or "Not well-formed" flag alongside the output. Note that well-formed is not the same as valid against a schema or DTD, which this does not check.
Will it fix broken or malformed XML?
Not exactly. It is a fast convenience formatter built on tag matching with regular expressions, not a full validating parser, so it will still indent input that has an unclosed or mismatched tag and simply warn you that the result is a best effort. Treat the well-formed flag as your signal to go find the real problem in the source.
Is my XML uploaded anywhere?
No. Both the formatting and the well-formed check run entirely in your browser, so your XML never leaves your device and there is no server round trip. That makes it safe for config files or API payloads you would rather not paste into a random website.