Format HTML markup for inspection or reduce simple whitespace with minification. The tool operates on markup text and does not test the behavior of a complete site.
How to use this tool
- Paste HTML and choose formatting or minification.
- Read the resulting markup in the editor.
- Test the result before replacing a source file.
How to interpret the result
Formatting parses HTML with the browser and can repair invalid markup or add document elements. Minification removes comments and collapses whitespace, which can change preformatted text, scripts or styles. Keep the source and avoid using the result as a guaranteed lossless build transform.
Frequently asked questions
Does formatted HTML mean valid, accessible HTML?
No. Readability does not prove standards compliance, accessibility, security or correct page behavior.