Paste HTML that is minified, copied from a page source or badly indented, and get it back with one element per line and consistent indentation. Short elements such as list items stay on one line, inline tags like <b> and <a> stay inside their text, and the content of <pre>, <textarea> and <script> is never rewritten. It formats as you type, in your browser.
<li>One</li> instead of three lines
33 lines
Formatting runs in your browser. What you type never leaves this device.
Indent with 2 spaces, 4 spaces or tabs
Block elements on their own lines; inline tags such as <a>, <b> and <span> stay with their text
<pre> and <textarea> content kept exactly, <script> code re-indented as a block without changing a character inside it
CSS inside <style> tags formatted with the same rules as our CSS formatter
Comments and the doctype kept; extra spaces inside tags removed while attribute values stay untouched
Copy the result or download it as an .html file
View source on most sites shows one long line. Paste it here to see the structure of the head, the navigation and the content blocks.
HTML exported from email builders is often deeply nested tables on a few lines. Formatting it makes it possible to find and edit the row you need.
Format both versions of a template the same way before comparing them in the Diff Checker, so only real changes show up.
Indented markup shows which element sits inside which, which makes a copied snippet much easier to understand and adapt.
With "Keep short elements on one line" on, an element whose content is only text and inline tags stays on one line when it fits within about 100 characters, so <li>One</li> does not become three lines. Turn it off to put every element's content on its own line.
The formatter re-indents; it does not validate or repair markup. Unclosed or mismatched tags are formatted as they are, which can make the indentation drift after the mistake. Long lists of attributes stay on the tag's line. To make HTML smaller rather than readable, use the HTML Minifier.
CSS Formatter
Beautify minified CSS: one property per line, indented media queries
HTML Minifier
Remove comments and extra whitespace from HTML, keeping pre, script and style intact
HTML, CSS and JS Playground
Write HTML, CSS and JavaScript and see the result live, with a console
Diff Checker
Compare text differences
HTML Encoder/Decoder
Encode and decode HTML entities
JSON Formatter
Format and validate JSON
JSON Sort Keys
Alphabetize JSON keys at every level
JSON Flatten
Nested JSON to dot-path keys
JSON Unflatten
Dot-path keys back to nested JSON
Built by Edesy
Edesy builds AI products for Indian businesses. Start self-serve, no demo call needed.
AI agents that answer and make phone calls 24/7. Handle appointments, inquiries and support in Indian and global languages.
₹50 free credit. No demo call needed.