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
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.
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.
An HTML minifier removes unnecessary whitespace, comments and some formatting from HTML to reduce file size. This minifier runs locally in your browser; it is not a replacement for a production parser or build pipeline.
Paste HTML into the tool, choose the HTML format and run minification. CometWeb removes unnecessary whitespace and comments, then lets you copy or download the result. The operation runs locally and is not a replacement for a production bundler parser.
Pick the JSON format, paste the file and copy the result. JSON round-trips through the browser parser, so minification only removes whitespace outside values, and an invalid file is reported rather than quietly corrupted. It all runs locally and nothing is uploaded.
Paste CSS, choose the CSS format and run minification. The tool removes unnecessary whitespace and comments in your browser, then lets you copy or download the result. Check the stylesheet after editing because this is a heuristic helper, not a production parser.
Paste HTML, CSS, JavaScript or SVG, choose the format and run minification. The tool removes unnecessary whitespace and comments locally; it does not replace a production parser.
Yes. The minifier supports HTML, CSS, JavaScript and SVG. It removes formatting and comments outside strings, but it does not replace TypeScript compilation, bundling or a secure production deployment pipeline.
A code minifier removes unnecessary whitespace and comments from HTML, CSS, JavaScript or SVG to reduce text-file size. It does not replace a production parser, a bundler, or Brotli/gzip compression.
Yes. Minification usually reduces the size of text-based HTML, CSS, JavaScript and SVG files. The result depends on formatting and comments; images need separate compression.
Minification can reduce transfer and parsing work for text assets, but it does not replace caching, Brotli, image optimization or Core Web Vitals work. Measure before and after deployment.
No. This version runs in the browser, so pasted code is not sent to CometWeb.
Not in this free tool. Source maps usually come from your build pipeline.
Compile to JS first (Babel/SWC), then minify.
Not here. Use the JS obfuscator for drop-console.
What else might come in handy
Core Web Vitals in every audit, with priorities, history and before/after comparison.