DEV · MINIFY

Minify

Paste CSS/JS to remove comments and whitespace and shrink size.

  1. 1.Type or paste the code to compress
  2. 2.Select the code type, CSS or JS
  3. 3.Click the ‘Minify’ button
  4. 4.Check the reduction and copy the compressed code

→ Output: Compressed code with whitespace and line breaks removed, plus the size reduction

Enter code and minify.

About this tool

Strips comments and unnecessary line breaks and spaces from CSS and JavaScript to shrink the file. Less to download means the page paints sooner. Your code is processed inside the browser and never sent anywhere.

When to use it

  • —Slimming down styles or scripts you plan to inline into a small page
  • —Manually reducing file size on a static site with no build tooling
  • —Fitting code into a tight size budget, such as an email template

Good to know

  • —This does not obfuscate: variable names and code structure are left alone; only whitespace and comments go.
  • —Code that relies on line breaks (JavaScript with omitted semicolons) can behave differently after minifying, so test it.
  • —Minified output cannot be restored, so keep the original.

Share your feedback on this tool

Used 0 times so far
Sign in to leave feedback