Skip to main content

CometWeb tools

HTML & code minifier online: minify HTML, CSS, JS, JSON and SVG

Free HTML, CSS, JS, JSON and SVG minifier that runs locally in your browser, no upload required

FreeNo account required
0 chars
0 chars

This is a fast, local heuristic minifier. It does not replace a production parser or bundler; quoted strings are preserved and their contents are not rewritten.

Check the result on a real page. Pair the output with Core Web Vitals and HTTP signals.
Run a performance audit

Use this HTML minifier online to remove unnecessary whitespace and comments from HTML, CSS, JavaScript, JSON and SVG. JSON round-trips through the parser, so an invalid file is reported rather than quietly mangled. It runs locally in your browser, so pasted code is not uploaded; it is a quick helper, not a replacement for a production parser, bundler or Brotli/gzip compression.

Why minification actually helps

Need a quick HTML, CSS, JavaScript or SVG minifier? This tool removes unnecessary whitespace and comments while keeping quoted strings intact.

Use it for one-off jobs: a snippet, a static CDN file, or a fast before/after check. For production builds, keep using a parser-backed bundler and server compression.

Everything runs in the browser. Your pasted code is not sent to CometWeb.

Keep the source and test the output

Work on a copy. Select the correct format, then check behavior and page appearance after minification. Templates, embedded JavaScript and whitespace-sensitive text need particular care.

What minification actually changes

WSWhitespace
Spaces, tabs, newlines outside strings.
//Comments
Line-leading // comments and /* */ blocks anywhere. A // at the end of a code line is kept, because this helper has no parser.
AAA→aMangling
Shorter variable names. This tool does not rename identifiers, your bundler does that.
BrotliServer compression
After minify, the server should still apply Brotli or gzip.
This tool patches one problem at a time

Core Web Vitals in every audit, with priorities, history and before/after comparison.