Beautify or minify HTML with custom indent, line wrap, syntax highlighting, line numbers, and one-click download — all private in your browser.
Also searched as: html formatter · html beautifier online · html minifier · format html code online · html pretty print
Indent size
Wrap long lines at
Step-by-step guide to get the most from this tool
Drop minified or messy HTML into the input panel.
Choose indent size, line wrap, and inline tag behavior.
Read syntax-highlighted output with line numbers.
Copy to clipboard or download as a .html file.
What makes this tool stand out
Tags, attributes, values, and comments colored.
2 spaces, 4 spaces, or tabs.
Collapse whitespace for production HTML.
Numbered output gutter for easy reference.
Save formatted HTML as a file.
Client-side js-beautify — no server.
More free utilities you might find useful
Quick answers to common questions
Paste your HTML in the input panel. Choose Beautify mode, set indent size and options, and read the formatted output with syntax highlighting instantly.
Beautify adds indentation and line breaks for readability. Minify removes extra whitespace to produce the smallest HTML string.
When enabled, inline elements like span and a stay on one line per js-beautify defaults. Disable it to indent every nested tag.
It formats markup for readability but does not guarantee W3C validity. Invalid HTML is passed through as-is when possible.
No. Formatting runs entirely in your browser using js-beautify with no network requests.
Your data is processed entirely in your browser. Nothing is sent to any server.