← All text tools

XML formatter & validator

Pretty-print or minify XML and find errors.

  • Free
  • No sign-up
  • Works on any device

About XML formatter & validator

Pretty-print XML with clean indentation, minify it to one line, and find errors such as unclosed tags or mismatched names. Valid XML needs one root element, properly nested tags and escaped special characters like & and <. The error message points to the line that breaks it.

How to use XML formatter & validator

  1. Paste your XML.
  2. Choose pretty-print or minify.
  3. Fix any error shown, then copy the result.

Why use this tool?

Also known as

Frequently asked questions

What makes XML well-formed?

One root element, every tag closed and properly nested, quoted attribute values, and special characters such as ampersands escaped as entities.

What errors are most common in XML?

Unclosed tags, mismatched tag names and unescaped ampersands are typical. The error message points to the place where parsing stopped.

Does the validator check against a schema?

It checks that the XML is well formed. It does not check the content against an XSD or DTD, so use a schema tool for that.

Is XML formatter & validator free?

Yes. XML formatter & validator on Toolipedia is free to use, with no sign-up and no watermark.

Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

Can I put XML formatter & validator on my own website?

Yes. Use the Embed on your site button under the tool to copy a short piece of code and paste it into your page. It is free, needs no account, and the tool keeps working inside your page.

Related tools