Home Developer Tools Code Minifier

Free Code Minifier - JS, CSS, HTML, JSON & SQL

Minify any code in your browser - no server, no signup, no watermark. Auto-detects language, catches console.log leaks, shows a real-world performance impact score, and downloads as script.min.js. Five languages, one tool.

Always Free Auto-detect language Download .min file Runs in browser
JS · CSS · HTML · JSON · SQL - 5 languages free
Auto-detects JS, CSS, HTML, JSON, SQL from pasted code
Catches console.log leaks before you deploy
Shows real load time savings after minifying
Minification options Show options
Input code
0 chars
Drop file to minify
Minified output
-

Minified code appears here

Paste code and click Minify

Compression results
Original
-
Minified
-
Saved
-
-
Original
-
Minified
-
Saved
-
Lines removed
Real-world performance impact

File queue

Not just a minifier.
A deployment tool.

Every other free minifier just strips whitespace and calls it done. This one catches your bugs, shows your savings, and fits into your real workflow.

Auto language detection

Paste any code - the tool detects JS, CSS, HTML, JSON, or SQL automatically and switches tabs. No manual selection needed.

instant detection

console.log detection

Before you deploy, the tool scans your JS for console.log, console.warn, debugger and other debug statements you forgot to remove.

saves embarrassment

Performance impact score

See exactly how much load time you save - on 3G, 4G, and broadband. Real numbers, not vague promises.

3G · 4G · broadband

Per-language options

Toggle what gets removed - keep license comments, auto-uppercase SQL keywords, shorten hex colors, remove zero units. Real control.

JS · CSS · HTML · JSON · SQL

Upload & download files

Drag and drop a .js or .css file - it reads, minifies, and downloads as filename.min.js. Real workflow, not just copy-paste.

drag & drop → .min file

Multi-file queue

Add multiple files to the queue and download all results as a ZIP. Nobody else offers this free.

batch · ZIP download

Minify any code in 3 steps

No build tools, no terminal, no npm. Just paste and go.

1

Paste or upload your code

Paste any JS, CSS, HTML, JSON or SQL into the editor, or drag and drop a file. The language switches automatically.

2

Set options & click Minify

Choose whether to remove console.logs, preserve license comments, shorten hex colors - then hit the blue Minify button.

3

Copy, download or share

Copy to clipboard, download as script.min.js, or share a link to the minified version with your team.

What is code minification and why does it matter?

Minification removes every character from your source code that a browser doesn't need to execute it - spaces, line breaks, comments, and long variable names. The code runs identically, but the file is significantly smaller and downloads faster.

According to Google's PageSpeed documentation, minification is one of the highest-impact optimisations you can make to a website's performance. It is also one of the easiest - especially with a tool like this.

How much smaller does minification make your files?

LanguageTypical size reductionWith Gzip on topBest for
JavaScript30–60%70–90%Removing comments, whitespace, debug code
CSS20–40%60–80%Collapsing rules, shortening values
HTML10–30%50–70%Removing comments, collapsing whitespace
JSON10–25%40–60%Removing all whitespace and formatting
SQL15–35%50–65%Collapsing queries, normalising keywords
Always minify + Gzip together. Minification removes redundant characters. Gzip (enabled on your web server) then compresses the remaining content. Both working together typically achieves 70–90% total reduction from original file size.

Should I minify in production or use a build tool?

For production sites with complex JavaScript, a build tool like Webpack, Vite, or Rollup with a minifier plugin (Terser for JS, cssnano for CSS) is the right long-term solution. But for quick checks, one-off files, client deliverables, or projects without a build pipeline, a browser-based minifier like this one is the fastest path to a smaller file.

Before deploying

Minify your JS and CSS before pushing to production to reduce load times immediately.

HTML emails

Minify HTML email templates to reduce message size and improve deliverability.

WordPress plugins

Minify plugin JS/CSS before submission to the plugin directory.

Mobile-first sites

Every byte matters on mobile. Minified files load faster on slow connections.

API responses

Minify JSON API responses to reduce payload size and improve response time.

PageSpeed score

Minification directly improves Google PageSpeed and Core Web Vitals scores.

Code minification questions,
answered.

Everything about minifying JS, CSS, HTML, JSON and SQL for production.

Ask a question
Code minification removes all unnecessary characters from source code - whitespace, comments, newlines, and long variable names - without changing what the code does. The result is a smaller file that loads faster in browsers.
Yes. Minification only removes characters that browsers ignore anyway - spaces, comments, and newlines. The code runs identically. Always keep your original unminified source code for future editing.
Typical savings are 30–60% for JavaScript, 20–40% for CSS, and 10–30% for HTML. Combined with Gzip compression on your server, total savings can reach 70–90% of the original file size.
No. All minification runs entirely in your browser using JavaScript. Your code never leaves your device and is never stored on any server. This makes it safe for proprietary or confidential code.
When minifying JavaScript, the tool scans for console.log, console.warn, console.error, and debugger statements that developers often forget to remove before deploying to production. You can choose to remove them automatically using the options panel.
Yes. Use the file upload button to add files to the queue one by one. Each file gets minified individually with its own compression stats. Download all results as a ZIP file using the Download all button.
Minification reduces file size by removing unnecessary source code characters - done once at build time. Gzip is applied by your web server during file transfer - done at runtime for every request. Both work together and are complementary - minify first, then let your server Gzip the result.
Both. Use a preprocessor like Sass for writing maintainable CSS, then minify the compiled output before deployment. This tool minifies already-compiled CSS - paste the output of your preprocessor into the CSS tab.