Developer & Text Tools

XML Formatter & Validator

Validate XML and pretty-print or minify it. Errors show the line and column, and CDATA, comments, processing instructions and attributes are kept.
Runs in your browserLive result

Workspace

Options

How to use this tool

  1. 1Paste XML, open a file or load the example.
  2. 2Choose Format or Minify and the indentation.
  3. 3If the XML is not well-formed, fix the reported line, then copy the result.

Frequently asked questions

It checks that the document is well-formed using the browser's own XML parser and reports the line and column of the first error. It does not validate against a DTD or XSD schema.

Yes. They are written back in place; only indentation between elements changes. Entities such as & stay escaped.

Files of several megabytes format in a second or two on a modern computer, because the work happens on your device.

No. Everything runs in your browser with JavaScript. The text you paste is not uploaded, logged or stored by MuhammadLab.