JavaScript Minifier

Compress pasted JavaScript snippets or local .js files with Terser running locally in your browser. Source code is parsed for minification only and is never executed.

Click to choose a JavaScript file or drop it here

You can also paste JavaScript directly into the editor below.

Input: 0 bytes

Output: 0 bytes

Ready

Browser-native minification

Terser is bundled only for this tool route, so pasted JavaScript is compressed locally without a server-side execution path.

Parse error feedback

Syntax errors are shown on the page with line and column details when the parser provides them.

Size comparison

Compare original and minified byte counts before copying or downloading compressed JavaScript.

Frequently Asked Questions

Is my JavaScript uploaded to Convertr?

No. The minifier runs locally with browser JavaScript. Pasted code and selected files are not sent to Convertr servers.

Does the tool execute pasted JavaScript?

No. Source text is parsed and transformed by Terser for compression only. The page does not eval code or load user-provided scripts.

Why is name mangling disabled by default?

Mangled names make output smaller, but some code relies on function names, class names, or reflection. You can enable it explicitly when size matters more.

JavaScript Minifier

Minify JavaScript source while preserving supported program behavior and reporting size change.

Input
JavaScript source plus supported compression and formatting options.
Output
Minified JavaScript and size information.
Real limitations
The tool does not run a test suite, transpile unsupported syntax, resolve modules, or prove semantic equivalence for code that relies on unusual parsing behavior.
Privacy and data handling
JavaScript source plus supported compression and formatting options is processed in this browser tab. Convertr does not receive or store it; closing or reloading the page clears the working state unless the tool explicitly offers a local download.

How to use this tool

  1. Provide JavaScript source plus supported compression and formatting options in the tool controls.
  2. Choose the settings that affect minified JavaScript and size information, then run the tool.
  3. Review minified JavaScript and size information before copying or downloading it.

Common failure modes

A syntax error, unsupported language feature, or invalid option stops minification instead of returning partial code.

Useful example

Minify a small ES module and review the output before replacing a production asset.