# JavaScript Minifier > A free, browser-based tool that minifies, compresses and beautifies > JavaScript using Terser 5. All processing happens client-side in > JavaScript; the code is never uploaded to a server. URL: https://seeb4coding.in/js/minifyjs/ Publisher: SeeB4Coding (https://seeb4coding.in/) Engine: Terser 5.51.2 (BSD-2-Clause), loaded from the jsDelivr CDN Price: Free, no sign-up, no usage limit. ## Modes - **Minify** - remove whitespace and comments, shorten local names, and rewrite code into equivalent shorter forms. - **Beautify** - reformat minified JavaScript with 2 or 4 space indentation. Mangled names cannot be restored. ## Syntax support Modern JavaScript up to ES2024: arrow functions, classes, class fields, private #members, static fields, async/await, async generators, optional chaining (?.), nullish coalescing and assignment (??, ??=), BigInt, destructuring, spread, template literals, import/export and dynamic import(). ## Presets - **Safe** - 1 compression pass, ES5 output, keeps class and function names, keeps debugger and console, keeps license comments. - **Balanced** (default) - 2 passes, ES2020 output, drops debugger, keeps console, keeps license comments. - **Aggressive** - 3 passes, ES2020 output, top-level mangling, drops console and debugger, removes all comments. Only for self-contained bundles. Changing any preset option manually switches the preset to "Custom". ## Settings - Output ECMAScript version: ES5, ES2015, ES2020. - Compression passes: 1, 2 or 3. - Comments: keep license comments (/*!, @license, @preserve), remove all, keep all. - Toggles: compress, mangle names, top-level scope, drop console.*, drop debugger, keep class names, keep function names, source map, ES module, run as I type (inputs up to 300 KB). ## Output - Minified or beautified code in a read-only editor with optional line wrap. - Stats: original size, output size, gzip size of each (measured with the browser CompressionStream API), percentage saved, processing time and line counts. - Source map (.map, version 3, with sourcesContent) and a matching //# sourceMappingURL comment when enabled. - Parse errors show the message, line, column and a code excerpt, with a button that moves the cursor to the error. ## Other behaviour - Paste, upload, or drag and drop .js, .mjs, .cjs or .jsx files. Several files are joined in selection order, each preceded by a comment with its file name. Maximum 10 MB in total. - Copy output, download .min.js (or .js in beautify mode), download .map, use output as input. - Draft input, settings and the last 20 runs are kept in browser localStorage only. - Dark mode. Responsive layout with an Input/Output switcher on phones and tablets. - Shortcuts: Ctrl/Cmd+Enter to run, Ctrl/Cmd+S to download the output. ## Related tools - HTML Minifier: https://seeb4coding.in/html/htmlminify/ - JSON Beautifier & Formatter: https://seeb4coding.in/json/beautifyjson/ - JS Compiler: https://seeb4coding.in/js/jseditor/ - Online HTML Editor: https://seeb4coding.in/html/editor/