Alpha DevTools logoAlpha DevTools
All ToolsBy Technology
Search tools…⌘K
ToolsFormattersJavaScript Minifier

JavaScript Minifier

Formatters

Compress and minify JavaScript with Terser. Removes whitespace, mangles variables, eliminates dead code. ES2022+ support. Shows compression ratio. Browser-based.

Related Tools

JSON FormatterSQL FormatterHTML FormatterCSS Formatter

About JavaScript Minifier

The JavaScript Minifier compresses JavaScript files using Terser — the most capable open-source JavaScript minifier and compressor. With `compress: true` and `mangle: true`, Terser performs dead code elimination, constant folding, inline expansion, and hexadecimal identifier renaming, producing the smallest valid JavaScript output. Real-time compression ratio and exact byte savings are displayed after each run. The output panel has line-wrap enabled for compact output, and a download button lets you save the minified file directly. All processing runs in a Web Worker; your code never leaves the browser.

Features

  • ✓Powered by Terser with compress: true and mangle: true for maximum compression
  • ✓Dead code elimination — removes unreachable code paths
  • ✓Constant folding — evaluates and replaces constant expressions at compile time
  • ✓Variable mangling — renames local identifiers to shortest possible names
  • ✓ES2022+ support — handles modern JavaScript including class fields and optional chaining
  • ✓Displays compression ratio and exact byte savings after minification
  • ✓Download minified output as a .js file with one click
  • ✓Line-wrap enabled in output panel — easy to read single-line output
  • ✓Language picker — instantly switch to CSS, HTML, JSON, or other minifiers
  • ✓One-click clipboard copy of minified output
  • ✓Web Worker execution — minification never blocks the UI
  • ✓Mobile-responsive layout with a dedicated Minify button
  • ✓100% client-side — your code never leaves the browser

Common Use Cases

  • Reducing JavaScript bundle size for production deployments
  • Compressing CDN-served utility scripts to minimise bandwidth and page load time
  • Minifying standalone JavaScript files before distributing as SDKs or libraries
  • Quickly checking compression ratio before integrating Terser into a build pipeline
  • Reducing file size of JavaScript payloads for email-embedded or app-embedded scripts

Frequently Asked Questions

QWhich JavaScript minifier does this use?

Terser — with both compress (dead code elimination, constant folding) and mangle (identifier renaming) enabled. Terser is the successor to UglifyJS and the most widely used JavaScript minifier in production.

QWill minification break my code?

Terser's compression is safe for standard JavaScript. Code that relies on function.name, Function.prototype.toString(), or uses string-based property access (bracket notation with dynamic keys) should be tested after minification.

QIs my code sent to a server?

No. Terser runs in a Web Worker entirely inside your browser. Nothing is transmitted to any server.

QWhat is the difference between the JavaScript Minifier and the JavaScript Obfuscator?

The minifier reduces file size through whitespace removal and variable renaming. The obfuscator adds additional transformations (control flow flattening, string encoding, dead code injection) specifically to deter reverse engineering, at the cost of larger output.

See Also

  • CSS MinifierMinify CSS stylesheets with csso
  • TypeScript MinifierCompile TS and minify with Terser
  • JavaScript FormatterBeautify minified JavaScript with Prettier
  • JavaScript ObfuscatorProtect JavaScript code against reverse engineering
189+ tools·and growing
100% private·nothing uploaded
Zero signup·open instantly
Always free·no paywalls ever
Alpha DevTools logoAlpha DevTools

Fast, free developer utilities for daily tasks. No signup required. Everything runs in your browser.

GitHubTwitter

Categories

  • Formatters
  • Converters
  • Security
  • Encoders & Decoders
  • UI Tools
  • Diagrams
  • Text & String
  • All categories

Technologies

  • JSON
  • YAML
  • CSV
  • XML
  • SQL
  • HTML
  • CSS
  • All technologies

Popular Tools

  • JSON Formatter
  • UUID Generator
  • JWT Decoder
  • Regex Tester
  • SQL Formatter
  • YAML Formatter

Platform

  • Home
  • All Tools
  • By Technology
  • Licenses
  • Contact

© 2026 Alpha DevTools — All rights reserved.

189+ tools · 14 categories · Free forever·Open-source licenses