HTML Formatter
Prettify or minify raw HTML markup with configurable indentation — all instantly in your browser, no server required.
Frequently Asked Questions
What is HTML prettifying?
Prettifying (also called "beautifying") re-indents your HTML with consistent spacing, making it easier to read and navigate. Opening tags increase the indent level, closing tags decrease it, and self-closing and inline tags are handled intelligently.
What does HTML minification do?
Minification removes unnecessary whitespace between tags and collapses multiple spaces into one, reducing the byte size of your HTML. This is useful before deploying static pages or inlining HTML in other contexts.
Are <script> and <style> contents preserved?
Yes. The prettifier detects <script>, <style>, and <pre> blocks and outputs their content verbatim, without altering indentation or whitespace inside them. This prevents breaking inline JavaScript or CSS.