Skip to main content
HandyWeb

XML Formatter and Validator

Pretty-print XML with clean indentation, minify it, or check that it is well-formed. An error shows its line and column.

Runs on your device.

Action
Indent
0 characters0 bytes
0 characters0 bytes

How to Use It

  1. Choose Format, Minify, or Validate.
  2. Paste your XML into the input box.
  3. Copy the output, or fix the error at the line and column shown.

Questions and Answers

Does formatting change the text inside elements?

No. Whitespace in text can be meaningful, so an element that holds text stays on one line, as it is. Only the whitespace between elements changes.

What does well-formed mean?

Every tag is closed, tags nest correctly, attribute values are in quotes, and the document has one root element. This tool does not check the document against a DTD or a schema.

My XML refers to external files. Is that safe?

Yes. The browser parser loads no external DTD or entity.

Good to Know

Only well-formedness is checked, not a DTD or an XML Schema. The error detail comes from your browser, in the browser language.

Source code of this toolReport a problem on GitHub