Formatters / LOCAL TOOL

XML Formatter & Validator

Format and validate XML locally without fetching external entities.

Runs locally — input is never uploaded
Paste, type, or drop XML

WHAT IT DOES

Make XML readable and know when it is malformed.

Paste XML to validate its tags, comments, attributes, namespaces, and CDATA, then format or minify it locally. Errors report the parser's line and column, while external entities and DTDs are refused instead of resolved.

Why use it?

Use it to make nested XML easier to inspect without treating it as HTML or executing its contents.

How to use this tool

  1. Paste the XML and format it; fix any reported parsing error before reviewing output.
  2. Use Minify only when a compact representation is useful, and check text-containing elements after rewriting.
  3. Formatting does not validate an XML schema or an application's rules. DTDs and external entities are refused, so documents depending on them need their own trusted toolchain.

Details and limitations

  • Formatting changes indentation and whitespace between elements while preserving character data, comments, CDATA sections, processing instructions, and attributes.
  • Minify removes formatting-only whitespace between tags but keeps text nodes and comments; it never fetches a DTD or external resource.
  • Malformed nesting, unclosed tags, invalid attributes, and unsafe entity declarations are reported before output is written.

COMMON QUESTIONS

XML Formatter questions

Does validation resolve external entities?
No. DTDs and entity declarations are rejected, so formatting cannot trigger XXE or a network fetch.
Will mixed XML text be rewritten?
The formatter keeps significant character data intact and only changes structural indentation where doing so is unambiguous.