</>

XML Formatter

Pretty-print and validate XML. Free, private and instant.

How to use the XML Formatter

  1. Paste XML into the box.
  2. The indented version appears as you type, with Copy and Download .txt buttons.
  3. If the XML is not well formed, an error shows the line and column.

Example

Worked example (default sample, tested in the browser)

  • Input: <root><item id="1"><name>First</name></item><item id="2"/></root>
  • Result: Indented over several lines: root, item id 1 containing name First, then the empty item id 2
  • Error: <root><a></root> gives: Opening and ending tag mismatch: a line 1 and root

Limitations

  • It checks that the XML is well formed, not that it matches a schema.
  • The text is re-serialised by the browser, so details such as the original quote style or XML declaration may change.
  • Unescaped & characters in text make the XML invalid.

About this tool

Indent XML so it is readable and catch well-formedness errors.

XML Formatter is part of ToolStack Hub's Developer Tools. It runs entirely in your browser, which keeps your data private and makes results instant. There is nothing to install and no account to create. There is no usage limit.

Frequently asked questions

Is the XML Formatter free?

Yes. XML Formatter is completely free with no sign-up, limits or watermarks.

Is my data private when I use the XML Formatter?

Yes. It runs in your browser, so your input is not uploaded to our servers.

Does it work on mobile?

Yes. ToolStack Hub tools work on phones, tablets and desktop browsers.

Need this automated for your business?

Vantalume builds custom AI and web automation workflows so your team can stop doing repetitive work.

Talk to Vantalume