XML Formatter / Validator

Paste XML to confirm every tag is closed and properly nested, attributes are quoted and entities are escaped, then format it with consistent indentation.

Loading the tool…

How it works

  • A small standards-based parser checks well-formedness: matching tags, a single root, quoted unique attributes and escaped “&” and “<”.
  • Runs entirely in your browser: what you paste is not sent anywhere.

Assumptions and limits

  • Checks well-formedness only: it does not validate against a schema (XSD/DTD) or resolve external entities. Text content is trimmed when formatted.

Frequently asked questions

What does well-formed mean?

It follows XML’s syntax rules. A well-formed document can still be invalid against a schema.

Related tools

Last reviewed 2026-10-28. More developer, web & seo tools tools. See the disclaimer.

Report a problem with this tool