HTML Formatter
The HTML formatter re-indents markup so nesting is visible, keeping inline elements on one line and leaving the contents of <pre>, <textarea>, <script> and <style> untouched. Attributes, comments and doctype are preserved exactly.
Your result will appear here.
Not sure where to start? Use Load example.
Results update automatically and are calculated on your device. Nothing you type is sent to a server.
Runs in your browser. Processing happens entirely in your browser. Nothing you enter is sent to Delimiter.live.
How to use the HTML Formatter
- Paste your HTML, or load an .html file.
- Choose an indent width.
- Copy or download the formatted markup.
Example
<div><p>Hi</p></div>
<div> <p>Hi</p> </div>
Common use cases
- Reading minified markup pulled from a live page.
- Tidying HTML pasted out of an email template or a CMS editor.
- Finding an unclosed tag by making the nesting visible.
Limitations and things to watch for
- Content inside <pre>, <textarea>, <script> and <style> is left byte for byte, because whitespace there is significant.
- The formatter does not repair broken markup. An unclosed tag will produce visibly wrong indentation, which is often exactly how you find it.
- Inline elements such as <strong> and <a> stay on the same line as their surrounding text by default, since breaking them would introduce whitespace the browser renders.