Free tools, no sign-up — everything runs in your browser.
ToolHub 1000Free online tools

XML Formatter: Make Minified XML Readable Again

One-line XML hides bugs in plain sight. Indentation turns a wall of angle brackets into a tree you can actually inspect.

What is the XML Formatter & Beautifier?

Paste minified or messy XML and get it back with each tag on its own line and indentation that shows the nesting. Opening tags push the next level in, closing tags pull it back, and text content sits at its own depth. It never changes your tag names or values, it only makes the structure visible.

How to use it

  1. Paste compact or tangled XML into the box.
  2. Click Beautify XML.
  3. Read the indentation to check the nesting.
  4. Copy the formatted XML back into your editor.

Worked example

<root><a>1</a><b>2</b></root> becomes a neatly indented tree with a and b nested under root.

How do I pretty-print XML?

Paste the XML and beautify it. Each opening tag indents the next level, each closing tag steps back out, and text lands on its own line.

Frequently asked questions

Does it change my data?

No. It only adds line breaks and indentation; tags, attributes, and text stay exactly as pasted.

Does it work on XML without a root element?

It formats whatever tags you paste, though well-formed XML with one root is the cleanest input.

Try the XML Formatter & Beautifier free · All guides