JavaScript Minifier screenshot

JavaScript Minifier

Minify JavaScript in your browser. Parsing happens locally — your code is never uploaded.

Privacy First
0 Runs
Updated 2026-11-06
No upload
Instant
No signup

What this javascript minifier does

Compress JavaScript with terser: remove dead code, shorten names and strip whitespace. Minification is done by a real parser and code generator, not by deleting spaces.

How to use it

JavaScript Minifier: paste the JavaScript into the box above, set Compress (default "true") and Mangle (default "true"), and press Run to get the result below.

Worked example

Input:

function greet(name) {
  // build the greeting
  const message = "Hello, " + name + "!";
  return message;
}

function twice(value) {
  return value * 2;
}

console.log(greet("world"), twice(21));

Output:

function greet(e){return"Hello, "+e+"!"}function twice(e){return 2*e}console.log(greet("world"),twice(21));

Why it runs in your browser

The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads JavaScript and returns result; reloading the page discards both.

Compress JavaScript with terser: remove dead code, shorten names and strip whitespace. Minification is done by a real parser and code generator, not by deleting spaces.

Minify JavaScript in your browser. Parsing happens locally — your code is never uploaded.

How to use it

JavaScript Minifier: paste the JavaScript into the box above, set Compress (default "true") and Mangle (default "true"), and press Run to get the result below.

Why it runs in your browser

The conversion happens on this page with JavaScript. Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere. The page reads JavaScript and returns result; reloading the page discards both.

What to Expect

Best for

  • Converting JavaScript to result when the data is already on screen.

What this tool keeps

  • Your input is not posted to a server, so it works offline after the page loads and nothing is retained anywhere.

Sample input

function greet(name) { // build the greeting const message = "Hello, " + name + "!"; return message; } function twice(value) { return value * 2; } console.log(greet("world"), twice(21));

Sample output

function greet(e){return"Hello, "+e+"!"}function twice(e){return 2*e}console.log(greet("world"),twice(21));

Frequently asked questions

How do I use the javascript minifier?

JavaScript Minifier: paste the JavaScript into the box above, set Compress (default "true") and Mangle (default "true"), and press Run to get the result below.

Is my input uploaded?

No. The text is parsed on this page with JavaScript and is never posted to a server.

Is there a size limit?

Yes: 5 MB per run. Larger input is refused with a message rather than freezing the tab.

Developer program

Build custom tools for your store

Join the SDK program to create useful ecommerce utilities for your store.