A careful HTML minifier that removes comments and collapses whitespace between tags, and leaves pre, textarea, script and style contents exactly as they are.
Your files are processed in your browser, on your own device. Nothing is uploaded to a server.
An HTML Minifier shrinks a page by removing comments and whitespace the browser does not need. This one takes the careful route, costs nothing and runs in your browser with no upload. The contents of pre, textarea, script and style elements are never touched, and your attributes stay exactly as written.
The minifier scans your markup in passes. It sets the protected blocks aside first, the pre, textarea, script and style sections whose spacing is real content. It then removes comments, folds the whitespace between tags down, and puts the protected blocks back word for word.
Two kinds of comments survive on purpose. Conditional comments aimed at old browsers stay, and license comments stay, because both carry instructions or legal text that was never meant as padding.
Hand-maintained static sites are the steady case. A landing page or a small site shipped as plain files picks up comments and blank lines with every edit, and nobody wants to strip them by hand before each deploy. Minify at ship time and the file that travels is the lean one, while your working copy stays readable.
Pasted-in fields are the second case. Plenty of CMS screens, website builders and email platforms cap the size of an HTML field or simply handle shorter input more gracefully. A minified page fits where the padded one complains. The same goes for templates stored in a database field or a config value.
The workflow pairs up neatly. Edit with the HTML Formatter open while the code needs to stay readable, then minify once at the end. The win from a safe minifier is a smaller file with zero surprises in the browser, and the CSS Minifier and the JS Minifier give the linked files the same treatment.
This minifier is conservative on purpose. Attributes are never rewritten and the quotes around attribute values are never removed. Aggressive minifiers strip quotes wherever the HTML spec allows it and save a few more bytes doing so. This tool leaves them in place, because one saved byte is not worth a page that breaks on an edge case in someone’s browser.
Comments carry a real warning. Some setups hide working markers inside comments, from old server-side includes to markers that frameworks use while streaming a page. Conditional comments and license comments are kept here as a matter of policy, and ordinary notes are removed. If your stack leans on other comment markers to do its job, run the output once in a test before it ships.
Keep the savings in perspective too. Gzip and Brotli compression already squeeze repeated whitespace well, so minification adds a modest slice on the wire rather than a dramatic one. The clearer wins are the raw file itself: smaller storage, shorter fields, and leaner markup when a page gets inlined into another file.
The minifier runs inside your browser tab. Your HTML is never sent to a ToolPeko server, never stored and never read by anyone here. Unreleased landing pages and client work get the same privacy as a test snippet, because the code path is identical. There is no account, no sign-up and no job counter. Paste a fragment or a full page and the terms stay the same.
The rules here are built to prevent exactly that. Protected blocks pass through untouched, attributes are never rewritten and quotes stay in place. Interactive pages still deserve one test run before the minified copy ships.
Conditional comments and license comments are kept on purpose. Conditional comments carry instructions for old browsers, and license comments carry legal text. Neither counts as padding.
No. The contents of style and script blocks pass through exactly as written, spacing and all. Use the CSS Minifier and the JS Minifier for those files when they live on their own.
The saving is a few bytes per tag, and the risk is a value with an unusual character breaking in the wild. Quotes stay, so every attribute value survives the trip exactly as written.
That depends on how much comment and whitespace padding your source carries. A heavily commented working file shrinks a lot. A file that was already tight barely changes, and the output shows you the result either way.
No upload happens. The minifier runs in your browser tab, and nothing is sent to or stored on a ToolPeko server.
Same rules as this one: free, in your browser, with nothing uploaded.
Paste messy JSON, get it neat and valid.
Check JSON and find the exact line that breaks it.
Squeeze JSON down to one tight line.
Open JSON as a tree you can fold and explore.
JSON rows turned into a CSV a spreadsheet can open.
A CSV file turned into clean JSON objects.
JSON rewritten as YAML for config files.
YAML config turned into JSON you can use in code.