JavaScript minifier
Minify JavaScript with Terser: comments and whitespace removed, local names shortened, license comments kept if you like.
Runs in your browserNothing uploadedWorks offline
Set up for this job. It runs on JS, CSS and HTML minifier, where every option is there to change.
Loading JavaScript minifierRuns on this device. Nothing is uploaded.
Questions
Which minifier is it?
Terser, run in your browser. It removes comments and whitespace, simplifies code and, with Shorten variable names on, renames local variables.
When should I tick ES module?
When the file uses import or export. Terser then treats the code as a module, which lets it handle top level names correctly.
Is my code uploaded?
No. Minification runs in this tab. Nothing you paste leaves your device.
Related tools
All developer toolsDeveloperjs mjs cjsJS, CSS and HTML minifierMinify JavaScript with Terser, and CSS and HTML with a careful whitespace and comment stripper. See the size before and after.Developerjs mjs cjsCSS minifierShrink CSS by removing comments and whitespace, keeping strings, url() values and license comments safe.Developerjs mjs cjsHTML minifierShrink HTML by removing comments and extra whitespace, leaving <pre>, <textarea> and scripts untouched.Developerhtml htmHTML viewer and live editorPaste or open HTML and see it render live as you type, at phone, tablet or full width, with one-click formatting and scripts off unless you turn them on.DeveloperBase64 encode and decodeEncode text or any file to Base64 and decode Base64 back to text or the original file, with a URL-safe option.DeveloperBinary to decimalConvert binary numbers of any length to decimal, with hex and octal shown too, exactly and as you type.