CalcBrew

JavaScript Minifier

Compress a script with Terser, the minifier behind most production bundles: whitespace and comments removed, variable names shortened, constants folded and dead code dropped. The byte count before and after is shown, and nothing leaves your browser.

0 B

🔒 Runs in your browser — nothing is uploaded. Formatting uses Prettier, minifying uses Terser; both load from the jsDelivr CDN on first use.

Share:

What Terser changes

InputOutputTechnique
function add(first, second) { return first + second; }function add(n,t){return n+t}mangling local names
const DEBUG = false; if (DEBUG) log();(removed)dead-code elimination
x = x + 1; return true;return x++,!0compression of expressions
obj.propertyobj.propertyproperty names are never renamed

Readable again: JavaScript formatter. Stylesheets: CSS minifier. Data: JSON formatter.

Frequently asked questions

Cite this calculator
APACalcBrew. (2026). JavaScript Minifier. https://calcbrew.com/javascript-minifier
MLA“JavaScript Minifier.” CalcBrew, 2026, calcbrew.com/javascript-minifier.

Link to https://calcbrew.com/javascript-minifier. Results are estimates; cite the underlying formula or data source for academic work.

Related tools

More in Developer Tools · All tools & games