JS & CSS Minifier

Minify CSS and JavaScript by stripping whitespace and comments to shrink the file.

Smaller files, faster pages

Minifying removes everything a browser does not need to run code — spaces, line breaks, comments — squeezing a stylesheet or script down to the smallest working version. Smaller files download faster, which directly improves page speed, so minified CSS and JS are what you serve to visitors even though you write and maintain the readable versions.

Paste your CSS or JavaScript and it comes back minified.

Minify the output, keep the source

The golden rule is that minified code is for machines, not for you: it is unreadable and painful to edit, so you always keep your original, formatted source and minify only the copy you deploy. In real projects a build step does this automatically. For a quick manual shrink of a file — or to see how much a stylesheet can be trimmed — pasting it here does the job. If you need to read someone's minified code instead, a beautifier reverses the layout.

JS & CSS Minifier FAQ

Why minify CSS and JavaScript?

Smaller files download faster, improving page speed. You serve the minified version while keeping the readable source.

Should I edit minified code?

No — always keep and edit your formatted source, and minify only the copy you deploy.

Is my code uploaded?

No. The minifying happens in your browser.

More Developer tools