Formatters
HTML Formatter
Templates copied from a CMS, email builders or browser dev tools often lose their structure. The HTML Formatter re-indents your markup so nested elements line up, making it easy to see where a div opens and closes or why a layout is breaking.
It understands void elements such as <br> and <img>, keeps inline content readable, and leaves your attributes untouched. Paste a fragment or a full document — both work.
How to use the HTML Formatter
- 1Use the HTML Formatter right on this page, or open the full workspace for history, sharing and every other tool.
- 2Paste your input, upload a file, or drag and drop a file onto the input box (up to 25 MB).
- 3The result appears in the output panel automatically and updates when you change the input or an option.
- 4Use Copy Output or Download to save the result. Nothing is uploaded to a server.
Example
A one-line card component is split so each element sits on its own indented line.
Input
<div><h1>Hello</h1><p>World</p></div>
Output
<div> <h1>Hello</h1> <p>World</p> </div>
When to use it
- Untangling markup exported from a page builder or WYSIWYG editor
- Reviewing HTML email templates before sending a campaign
- Teaching or learning how nested HTML elements relate to each other
Tips and common mistakes
- Format first, then use the Diff Checker to compare two versions of a template.
- If indentation looks wrong, look for an unclosed tag just above the problem area.
- Use the HTML Minifier when you need the compact version again for production.
Frequently asked questions
Does it fix invalid HTML?
It formats what you give it. Browsers are forgiving, so unclosed tags may still format, but the indentation will reveal where the structure goes wrong.
Is my HTML sent to a server?
No. Formatting happens entirely inside your browser.