How to use the HTML Formatter
- Paste your HTML into the left box, or open a file.
- Adjust the options if you need to.
- Copy the formatted HTML or download it as a file.
What does this tool do?
Formatting uses the open-source js-beautify engine, loaded only on this page. Inline CSS and JavaScript inside the HTML are formatted too. Your code is only re-printed, never run.
Why use it?
- Read minified page source.
- Tidy templates and emails.
- Quick minification for small snippets.
Tip
For production sites, let your build tool minify HTML automatically. This tool is best for one-off snippets and debugging.
Privacy
Everything you type is processed in your browser. Nothing you enter is sent to our servers or stored by us. There's no account to create and nothing to install.
Last reviewed by the M2Toolkit team.