Kharabeesh
On-device ع

XML Formatter & Validator

Pretty-print or minify XML (and SVG or RSS), and check it is well-formed: matching tags, a single root, quoted attributes and valid & entities, with the line and column of any error.

Free, no sign-up Saved on your device only Works offline after first open

The tool

Loading the tool…

How to use

  1. Paste XML or open an .xml or .svg file.
  2. You see right away whether it is well-formed; any error shows its line and column.
  3. Choose Format or Minify, then copy or download the result.

Privacy & how it works

Saves your data in this browser only (back it up or delete it from “My data”).

  • Engine: lightweight in-page code, no external libraries.
  • Works offline after you open it once.

Frequently asked questions

What does well-formed mean?

Every opened tag is closed with the same name in order, there is a single root element, attributes are quoted and not repeated, and & is written as & or a valid entity. This is not DTD or XSD schema validation, which the tool does not do.

Why are some elements not split onto lines?

An element containing both text and tags (mixed content) is kept as is, because adding whitespace inside it could change its meaning.

Does it work with SVG, RSS and sitemaps?

Yes, they are all XML. Just make sure the file has no HTML-style mistakes such as an unclosed <br>.

Related tools