CSS, JS & HTML Minifier
Paste CSS, JavaScript or HTML and get a minified version with comments removed and whitespace collapsed, plus a size-saved readout. Everything runs in your browser — your code is never sent anywhere and nothing is stored.
How to use the minifier
- Choose whether you are minifying CSS, JavaScript or HTML.
- Paste your code into the box.
- Click Minify, check the size saved, then copy the result.
CSS and HTML minification strips /* */ or <!-- --> comments and collapses whitespace.
The JavaScript option is a basic minifier — it removes comments and extra blank lines and collapses whitespace,
but it does not rename variables or restructure code the way a full tool such as Terser does, so always test the output before deploying.
More PAYATE tools
Frequently asked questions
What is minification?
Minification removes everything a browser does not need to run your code — comments, line breaks and extra whitespace — producing a smaller file that downloads faster. The code behaves exactly the same; it is just more compact.
Is my code uploaded anywhere?
No. Minification runs entirely in your browser with plain JavaScript — nothing is uploaded to a server and nothing is stored. It is safe to use with private or proprietary source.
Is minifying JavaScript safe?
This is a basic minifier: it strips comments and collapses whitespace but does not rename variables or rewrite your code the way a full compiler such as Terser or UglifyJS does. It keeps strings intact on a best-effort basis, so always test the result before shipping.
How is minification different from gzip?
Minification permanently rewrites the source text to be smaller, while gzip is compression applied by the server when the file is sent and transparently decompressed by the browser. They stack: a minified file that is also gzipped is smaller still.