Code minifier

Reduce the size of CSS or JavaScript.

🔒 This file is processed in your browser. It is never uploaded anywhere.

What it is for

Minifying is the opposite of formatting: stripping out everything a browser does not need to run the code. Spaces, line breaks, comments and indentation disappear, leaving a much smaller file that works exactly the same.

The goal is speed. Every byte a visitor has to download delays the page, and on mobile connections the difference shows. A minified CSS can drop to half its original size or less, and that translates into a site that appears sooner.

Load speed also affects ranking, because Google factors it into its assessment of user experience. Minifying is one of the simplest optimisations to apply with a measurable effect.

How it works

  1. Choose whether your code is CSS or JavaScript.
  2. Paste the code you want to shrink.
  3. Click "Process" and copy the minified version, without unnecessary spaces or comments.

When to use it

Publishing a website

Minifying CSS and JavaScript before uploading immediately reduces total page weight.

Improving speed

When an audit reports that files are too heavy, minification is the first fix, and the cheapest.

Saving bandwidth

On high-traffic sites, cutting the weight of each visit adds up to a noticeable saving.

Practical tips

  • Always keep the unminified original: that is the one you can keep editing. The process has no undo.
  • Minify as the last step before publishing, never during development.
  • Check the site still works after minifying, especially the JavaScript.
  • Combined with server compression, the saving multiplies: the two techniques add up.

Frequently asked questions

What is minifying code for?

It reduces file size by removing spaces, line breaks and comments, which helps your site load a bit faster.

Can I reverse the minification afterwards?

No, it's a one-way process; always keep a copy of the original, non-minified code so you can edit it later.

Related tools