Free Developer Tool — 100% In-Browser

JavaScript & CSS Minifier

Minify JS and CSS instantly and watch the exact bytes you save — or beautify minified code back into readable form. Everything happens locally in your browser, so your production source code is never uploaded to any server.

  • ✔ JS & CSS, minify + beautify
  • ✔ Exact byte savings shown
  • ✔ Safe, conservative JS mode
  • ✔ Copy-ready output
  • ✔ Nothing uploaded
  • ✔ Free Forever
INPUT function hello ( name ) {… MINIFIED function hello(name){return"Hi "+name} 12.4 KB → 6.8 KB 45% smaller, in milliseconds 100% PRIVATE your code never leaves your browser

Minify & Beautify Code, Without Uploading It


Minification strips comments, whitespace, and redundant syntax from your JavaScript and CSS, cutting file size 20–50% — faster pages, better Core Web Vitals, better rankings. But most online minifiers POST your code to a server, which is a non-starter for proprietary or client-confidential source.
This tool minifies and beautifies entirely in your browser. CSS gets aggressive, full minification. JavaScript uses a conservative mode that removes comments and indentation while never breaking semicolon-sensitive code — with beautify to restore readability when you need to inspect a minified third-party file.

How It Works

1. Pick JS or CSS

Choose the language — the right minification rules apply automatically.

2. Paste Your Code

Paste the source you want to shrink, or a minified file you want to beautify.

3. Minify or Beautify

One click — output appears alongside with exact byte savings.

4. Copy the Result

Copy the output straight into your build or download-ready bundle.

Also Format JSON?

Validate, format and minify JSON — or convert it to CSV and XML — with our JSON Formatter & Validator.

Open JSON Formatter →
Minification Reference

What Gets Minified — and What Doesn't

TransformApplies to
Comment removalCSS & JS — all /* */ and // comments are stripped (string literals are preserved).
Whitespace collapseCSS & JS — indentation, line breaks, and padding around punctuation are removed.
Trailing semicolonsCSS — the last ; before } is dropped.
Zero unitsCSS — 0px, 0em etc. become 0.
Color shorteningCSS — #aabbcc becomes #abc; hex colors are lowercased.
Variable renamingNot performed. Renaming local variables (like Terser does) requires a full JS parser — this tool's conservative JS mode keeps identifiers untouched, guaranteeing your code runs identically.
Dead code eliminationNot performed. For aggressive JS minification in production builds, use a build step (Terser/esbuild). This tool is for quick, private, browser-side shrinking.

Why is the JS minifier "conservative"?

Aggressive JS minification (joining all lines, renaming variables) can silently break code that relies on automatic semicolon insertion. This tool strips comments, indentation, and blank lines while keeping every statement on its own line — typically saving 20–40% on commented, indented source with zero risk of changing behavior.

When should you minify?

Ship minified CSS always. For JS, minify anything served to browsers, but keep the readable original in version control. Beautify mode is ideal for inspecting minified third-party scripts before you trust them.

FAQsJS & CSS Minifier

Is my source code uploaded to a server?

No. All minification and beautification runs entirely in your browser. Your code is never sent to, stored on, or logged by any server.

How much smaller will my code get?

CSS typically shrinks 25–40%; JavaScript 20–40% depending on comments and indentation. The tool shows exact before/after byte counts and the percentage saved.

Does it rename variables like Terser or UglifyJS?

No — that requires a full parser and can change behavior in edge cases. This tool uses a safe, conservative transform that never touches identifiers or statement structure, so the output is guaranteed to run identically.

24/7 Support Available:

Our support team is here to assist you around the clock. Get Expert Help, Anytime.