Unminify HTML online
Turn a compressed page source into readable markup. Tags are indented by nesting depth, attributes are laid out sensibly, and inline scripts and styles are formatted along with the document.
Why page source looks like that
HTML minifiers collapse the whitespace between tags, remove comments, drop optional closing tags and strip quotes around attribute values that do not need them. Server side templating adds to the mess, because a page assembled from dozens of partials arrives as a single stream with no relationship to the files that produced it. Open the source of almost any production site and you will find a document with a handful of enormous lines, where finding the closing tag of a section means counting angle brackets by eye.
Structure is the whole point
HTML is a tree, and a tree is unreadable when it is printed flat. Indenting by nesting depth immediately shows you the shape of the document: where the header ends, which container wraps the main content, how deep a component sits, and which element is missing its closing tag. That is what makes a formatted page source useful for checking heading order, inspecting the markup a framework generated, or working out how a competitor structured a section you want to understand.
Inline scripts and styles are handled too
A real page is rarely just markup. Analytics snippets, JSON-LD structured data, configuration objects and critical CSS are all embedded directly in the document, and a minifier compresses those as well. The formatter treats each embedded block with the right parser, so a script tag containing minified JavaScript comes out as readable JavaScript, and a style tag comes out as readable CSS, all inside the correctly indented document.
Formatting is safe for whitespace sensitive tags
Indenting HTML changes the whitespace between tags, and whitespace can be significant. The formatter respects that: pre and textarea content is left exactly as it is, and inline elements are not broken in ways that would introduce or remove visible spaces around text. You still get a document you can read without changing how the page renders.
Frequently asked questions
Can I paste a whole page source?
Yes. Copy the source from your browser with view-source, or load the URL directly, and the full document including the head, the body, inline scripts and structured data will be formatted.
Will formatting change how the page renders?
It should not. Whitespace sensitive elements such as pre and textarea are preserved, and inline content is handled carefully. That said, always format a copy for reading rather than shipping the output back into production untested.
Does it work on templates such as Twig or Blade?
Partially. Plain markup formats fine, but template tags with their own syntax may confuse the HTML parser. The tool is designed for the HTML a browser actually receives rather than the template that generated it.
