jsonecho

XML Pretty Print

Pretty print XML with the indentation you prefer.

Loading the tool...

How to use XML Pretty Print

  1. Paste your XML.
  2. Choose the indent.
  3. Copy the result.

About XML Pretty Print

Pretty printing adds line breaks and indentation. The data does not change, but you can finally see which element sits inside which. It is the first step in debugging nearly any XML problem.

Choose between two, three or four spaces or a tab. If the XML has a mistake, you get the line and column instead of a half-printed result.

Frequently asked questions

What is the difference between pretty print and format?

Nothing in practice. The two terms are used interchangeably, and this page runs the same engine as the XML Formatter.

Will it reorder my attributes?

No, attributes stay in the order you wrote them.

Does it work on SVG files?

Yes. SVG is XML, so it formats and validates like any other XML document.

More in XML Tools

All tools →