A small function
function add(a, b) {
// returns the sum
return a + b;
}function add(a,b){return a+b}Minify JavaScript to reduce file size, using the same engine as production build tools.
The result will appear here.
Was this tool useful?
Minifying JavaScript strips everything a parser doesn't need — comments, whitespace, redundant syntax — without changing what the code does. It matters most for anything shipped to a browser: every byte downloaded before the page becomes interactive.
This tool runs Terser, the minifier behind most production JavaScript bundlers, entirely in your browser via WebAssembly-free pure JS — so it applies the same real optimizations a build tool would, not a naive regex-based whitespace stripper.
function add(a, b) {
// returns the sum
return a + b;
}function add(a,b){return a+b}