Readable markup from any source
HTML copied from a CMS, an email builder or a production page is often one giant line. The formatter rebuilds it with consistent indentation, one element per line where it helps, and properly formatted <style> and <script> blocks, so you can find the section you need to edit.
Content that depends on whitespace, like <pre> and <textarea>, is left exactly as it was. You can choose the indent size, whether to wrap long lines and how many blank lines to keep, then copy the result or download it as an .html file.
How to beautify HTML
- 1
Paste the HTML
A full page or just a fragment.
- 2
Adjust the options
Indent size and line wrapping.
- 3
Copy the formatted code
Or download it as a file.
Key features
Formats embedded code
Inline CSS and JavaScript are indented too.
Whitespace-safe
Leaves <pre> and <textarea> content untouched.
Configurable
Indent size, wrapping and blank lines.
Local processing
Nothing is uploaded.
Common uses
- Editing exported templates: Tidy HTML from page builders and email tools.
- Reviewing third-party code: Read minified markup from a live site.
- Teaching and documentation: Show clean examples to students or teammates.
Tips and good to know
- Going the other way? The HTML Minifier shrinks HTML for faster pages.
- To show HTML as text on a web page, escape it with the HTML Entity Encoder.
