๐Ÿ“ฆ

HTML / CSS / JS Minifier

Minify CSS, JavaScript and HTML to reduce file size and speed up your website.

Built and maintained by Abdur Rehman ยท Free, no sign-up

Loading HTML / CSS / JS Minifierโ€ฆ
๐Ÿ”’PrivateRuns in your browser โ€” nothing is uploaded.
โšกFastInstant results, no waiting in queues.
๐Ÿ’ธFreeNo sign-up, no watermark, no limits.
๐Ÿ“ฑAnywhereWorks on phone, tablet and desktop.

How to use the HTML / CSS / JS Minifier

  1. Choose the language
  2. Paste your code
  3. Click Minify and copy the result

Minify or beautify code

Choose CSS, JavaScript, HTML or JSON, paste your code and click ๐Ÿ“ฆ Minify โ€” or โœจ Beautify to make minified code readable again. You see the size before and after and the percentage saved. JavaScript uses Terser, the minifier behind most build tools, which also shortens local variable names safely.

What minifying does

Minifying removes comments, spaces and line breaks โ€” and for JavaScript, renames local variables โ€” so files download faster without changing what they do. A typical stylesheet shrinks by 20โ€“40%, and your server's gzip compression comes on top of that.

  • CSS โ€” strips comments and whitespace and shortens values such as 0px to 0.
  • JavaScript โ€” compresses and shortens names with Terser.
  • HTML โ€” removes comments and the whitespace between tags.

Back to readable code

Click Beautify to re-indent minified code so you can read it. Original variable names and comments can't be recovered once they have been removed, so always keep your readable source files.

Minifying automatically

  • VS Code โ€” install a minify extension, or use a build tool such as Vite or esbuild that minifies for you.
  • WordPress โ€” caching plugins such as Autoptimize or LiteSpeed Cache have a minify option.

๐Ÿ’ป Keep exploring Developer Tools

See all Developer Tools