Minify JavaScript, CSS and HTML
Strip comments and unnecessary whitespace from your code to make it smaller and faster to download.
Settings
Color 1
Color 2
Angle (135°)
background: linear-gradient(135deg, #6366f1, #a855f7);
How to use the JS / CSS / HTML Minifier tool
- 1Choose JavaScript, CSS or HTML.
- 2Paste your code.
- 3Click the minify button and copy the result.
Good to know
- Code is processed in your browser and never uploaded.
- Comments are removed without corrupting strings or operators.
Frequently asked questions
Will minification break my code?
It only removes comments and whitespace. Always test minified code before deploying.
How much smaller will my files get?
Typically 20–40%, depending on how many comments and how much indentation the code has.
Does it rename variables?
No. It's a whitespace and comment minifier, not a full optimiser like Terser.
Related tools
HTML FormatterBeautify messy or minified HTML with clean, consistent indentation so it's easy to read and edit. Free and private.CSS Gradient GeneratorDesign linear CSS gradients visually, preview them live and copy the CSS code. Free gradient generator for web designers and developers.JSON FormatterFormat, validate and minify JSON instantly. Paste JSON to pretty-print it with indentation or compress it. Free and private — nothing is uploaded.