Browse all tools
Developer Tool

JS Minifier

A free JavaScript minifier. Paste your code or upload a .js file and minify JavaScript online in three levels, from light cleanup to full mangling. See the exact size saved, then copy or download the .min.js. No signup, nothing uploaded.

Minify level
JavaScript Paste your code or drop a .js file
0 characters
Minified Smaller, production-ready JavaScript
Minified output appears here.
Waiting for input
Guide

How to minify JavaScript

1

Add Your Code

Paste your JavaScript into the box, or switch to the upload tab and drop in a .js file.

2

Pick A Level

Choose Light to strip comments and spacing, Standard to also shorten code, or Maximum to also rename variables for the smallest output.

3

Copy Or Download

The minified code appears below with the size saved. Copy it or download a .min.js file.

JS Minifier

Minify JavaScript Online, Smaller Files, Faster Pages

Benefits

Why Use This JavaScript Minifier

Real Minification

Built on a proper JavaScript parser, not a find-and-replace, so it safely compresses code and reports a syntax error instead of breaking it.

Three Levels

Light, Standard, or Maximum. Choose readable cleanup, full compression, or aggressive name mangling for the smallest file.

See the Savings

Every run shows the original size, the minified size, and the exact percent and bytes saved, so you know the gain.

Paste or Upload

Type or paste your JavaScript, or drop a .js file up to 5 MB. Line numbers and syntax-safe output on both sides.

Copy or Save

Copy the minified code with one click or download it as a ready-to-ship .min.js file.

Private and Free

Everything runs in your browser. Your code is never uploaded, and there is no sign-up or limit.

FAQ

Frequently Asked Questions

Common questions about minifying JavaScript.

How do I minify JavaScript online?

Paste your code or upload a .js file, choose a minify level, and the minified output appears instantly. Then copy it or download the .min.js. It is free, runs in your browser, and nothing is uploaded.

What does minifying JavaScript do?

It removes characters a browser does not need, comments, whitespace, and line breaks, and can compress expressions and rename variables. The code does exactly the same thing but in a smaller file that loads and parses faster.

What is the difference between the levels?

Light strips comments and whitespace only. Standard also compresses expressions and removes dead code. Maximum adds name mangling, renaming local variables to single letters for the smallest output.

Will minifying break my code?

No, if your input is valid JavaScript. The tool parses the code properly and reports a syntax error rather than producing broken output. Test the minified file once before deploying, as a habit.

What is the difference between minify and gzip?

Minifying rewrites the source to be smaller. Gzip or Brotli compresses the file in transit at the server. They stack: minify first, then let your server gzip, for the smallest possible download.

Does minify mean the same as Terser or UglifyJS?

Terser and UglifyJS are minifier engines. This tool minifies with a modern, ES6+ compatible engine, so it handles current JavaScript syntax that older UglifyJS cannot.

Is there a file size limit?

You can paste any amount of code, and uploaded .js files are supported up to 5 MB. Everything is processed on your device.

Is this JavaScript minifier free?

Yes, completely free with no sign-up and no limits. Minify as many files as you like.

Scroll to Top