HTML Formatter
Make messy HTML readable with clean indentation or shrink it for production with the basic minifier — choose your indent size and see the before-and-after size report, all inside your browser.
Minify mode is a basic regex-based compressor (removes comments and extra whitespace) — for production builds use a dedicated build tool.
How to use
- Paste your HTML into the input box.
- Click Beautify with your preferred indent size, or Minify (basic) to compress it.
- Check the size comparison, then copy the output or download it as an .html file.
Tips
- Beautify copied source code before you start editing it.
- Use the size report to see what minifying saves you.
- The minifier is basic — for production builds, use a dedicated build tool.
- Try the sample button to see the formatter in action.