Skip to content
Allin

HTML Beautifier

Turn minified or tangled HTML into cleanly indented, readable markup — or minify it.

HTML Beautifier is free to use as often as you like, directly from this page. You will find it under JSON, XML & formats, with CSS Beautifier and JavaScript Minifier / Beautifier for the neighbouring cases.

How to use it

  1. Open the tool — no signup or install needed.
  2. Enter your input or adjust the available options.
  3. Get your result instantly, then copy or download it.

Frequently asked questions

What is HTML Beautifier?

Turn minified or tangled HTML into cleanly indented, readable markup — or minify it.

When would I actually use this?

Making a machine-generated blob readable, finding the character where a parse fails, and shrinking a file before it ships.

What is the most common mistake?

Assuming valid means correct. A document can parse cleanly and still have the wrong shape for whatever will read it — validation checks the syntax, not the schema.

How is HTML Beautifier different from CSS Beautifier?

They sit next to each other but answer different questions: CSS Beautifier is the one to open when you need it to reformat minified or messy CSS into clean, properly indented rules — or minify it back. Pick whichever matches what you're starting from — both are free.

Is there a tool for the next step?

JavaScript Minifier / Beautifier is the closest one after this: Minify or beautify JavaScript in your browser, with a tokenizer that respects strings, regex and comments.

What else is worth having open alongside it?

Markdown to HTML and HTML Compressor — they come up in the same task often enough to be worth a second tab.

Where do the figures come from?

Parsing and serialisation follow each format's specification. Key order and whitespace are not semantically meaningful in JSON or YAML, so a reformatted document is equivalent even when the bytes differ.

Further reading

All guides
GuideBeautify or Minify: What Each Is For, and What It Does to the WeightFour real stylesheets run through the minifier, measured raw and after gzip. Stripping every space saved 48, 103, 104 and 147 compressed bytes; stripping comments saved 57, 1 358, 2 420 and 1 042. Plus the five inputs this minifier breaks.How-toBuilding a Markdown Table From Scratch, Without Counting Dashes by HandThe smallest thing that is still a table is two lines: a header row and a delimiter row. Here is why the second one is mandatory in GitHub Flavored Markdown, where pipe tables do not exist at all, and what a generator does that hand-typing cannot.GuidePasting a Table Into a Pull Request: What Breaks, and the Two Characters That Break ItA Markdown table has exactly two forbidden characters in a cell: the pipe and the line break. Here is what each one does, how a converter handles them, why the escape has to be applied in the right order, and why padding never matters.GuideWhat a Minifier Can Remove, and What It Must NotMinification has to preserve meaning, and the interesting part is the whitespace that carries meaning: the descendant combinator, the spaces inside calc(), the gap between two inline elements. Measured here on real files, including how much brotli was going to save you anyway.How-toMarkdown: A Beginner's GuideFormat plain text with a few symbols: # for headings, ** for bold, - for lists. Here's what markdown is, the core syntax, why it's everywhere, and the gotchas.ExplainerWriting a Date as ISO 8601, and Why It Is the Only Unambiguous Format01/02/2026 is 1 February in most of Europe and 2 January in the United States, and nothing in the string says which. ISO 8601 fixes that, sorts as text, and stops being ISO 8601 in four specific places that RFC 3339 rejects.