Format, validate, and minify XML

XML Formatter

Paste XML, choose indentation, and create readable or minified output without uploading or executing the document. Malformed XML and entity declarations are rejected.

Enter source text to begin.

Strict XML validation

The browser XML parser validates one well-formed document. Element order, attributes, text, comments, and CDATA content are serialized without silently repairing malformed source.

Entity-safe by design

DOCTYPE and ENTITY declarations are rejected. The tool never resolves external DTDs, loads entities, runs scripts, or requests referenced resources.

Formatting boundaries

Pretty printing adds layout whitespace between markup tokens. Minifying removes inter-tag whitespace; it does not promise schema-aware canonical XML.

Practical input limit

Input is limited to 6 MB of text. Small files, common 100 KB and 1 MB inputs, and representative 5 MB workloads are supported locally; larger work should use a streaming or command-line workflow.

Related developer tools

Browse all Developer Tools.