XML Formatter and Validator

Format, minify, and validate XML text in your browser.

The XML tool organizes configuration and interface data while checking XML syntax locally in the browser.

Loading...

Examples and limits

Enter XML with one root element and choose Format, Minify, or Validate. DOCTYPE declarations are rejected, external entities are never loaded, and input is never executed. Validation checks XML syntax, not DTD or XML Schema rules.

Usage

  • Format adjusts indentation in element-only containers, using two spaces by default.
  • Minify removes layout whitespace in element-only containers while preserving mixed text, CDATA, text-only nodes, and xml:space="preserve" regions.
  • Serialization may normalize attribute quotes and empty-element syntax; original byte formatting is not preserved.
  • Syntax errors include unclosed tags, unquoted attributes, and duplicate attributes.
Licensed under CC BY-NC-SA 4.0

Report a problem

The links prefill this page's title and address. Add what happened and how to reproduce it.