HTML / XML

Format HTML & XML, check XML well-formedness, encode/decode entities.

Loading tool…

About this tool

Pretty-print HTML or XML with consistent indentation, minify it back down, and check XML for well-formedness with the exact parser error when it fails. A separate entities tab encodes and decodes HTML character references.

Void HTML elements are handled correctly so tags like <img> and <br> do not skew indentation, and comments and CDATA sections are preserved intact. Two limits worth knowing: validation applies to XML only — HTML is reformatted but never checked — and minifying strips whitespace that sits directly between two tags, which can change the rendered result inside <pre> or <textarea>.