Skip to main content
Z

JavaScript Minifier — Compress & Shrink JS With Terser

Minify JavaScript with terser. Mangle, compress, comment policies — and a before / after size comparison.

Free No signup Client-side Privacy friendly Updated

Size:

Size: · saved %

Working…

How to use

  1. 1 Paste your JavaScript on the left.
  2. 2 Toggle Mangle / Compress and pick a comment policy.
  3. 3 Click Minify — see before / after size at a glance.

Why use this tool

  • Real terser engine — same minifier used by webpack, Rollup, and Vite.
  • Lazy-loaded — terser is fetched only when you click Minify, keeping the page light.
  • Side-by-side size comparison so you can see exactly what you saved.
  • Pure client-side — your source never leaves the browser.

Frequently asked questions

What is the difference vs obfuscation?

Minifying shortens names and compresses syntax for performance. Obfuscation goes further — flattens control flow, encodes strings, injects dead code. See the <a class="underline" href="/js-obfuscator">JS Obfuscator</a>.

Will it run on modern JS?

Yes — terser supports ES2020+ syntax including optional chaining, BigInt, top-level await.

Need to pretty-print it back?

Use the <a class="underline" href="/javascript-formatter">JavaScript Formatter</a> to reverse the layout (not the mangling).

What is JavaScript Minifier?

A JavaScript Minifier is a tool that compresses JavaScript source code to reduce its file size for faster delivery. Built on terser, it offers control over name mangling, compression, and comment policies, and shows a before-and-after size comparison. Running entirely in the browser, it minifies code client-side so scripts are never uploaded to a server.

Features

Terser-powered

Industry-standard compression with configurable mangle and compress passes.

Before/after sizes

See exactly how many bytes the minification saved.

100% private

Your source is processed locally — nothing is uploaded.

Example

Input

function add(a, b) {
  // sum two numbers
  return a + b;
}

Output

function add(n,d){return n+d}

Common use cases

  1. 1

    Shrink a script before shipping

    Cut bytes on a standalone JS file to speed up page load.

  2. 2

    Quick one-off minify

    Minify a snippet without wiring up a build tool.

  3. 3

    Compare compression settings

    Toggle mangle/compress and watch the size delta to tune output.

Summary

Zerethon's JavaScript minifier compresses JS with terser in your browser, with control over name mangling, compression, and comment policy, plus a before/after size comparison. Code is minified client-side and never uploaded.

Category
Developer
Pricing
Free
Privacy
Browser-based
Signup
Not required

References

Privacy

Your data never leaves your browser unless explicitly stated. JavaScript Minifier runs entirely client-side — no server upload, no logging, no tracking of your input.

Related tools

Build, share, and grow on Zerethon Social

Free signup. Earn points, collect achievements, and connect with creators worldwide.

Try Zerethon free