JS Minify
Compress JavaScript with Terser, the minifier used by most build tools, directly in your browser.
- Runs in your browser
- Free to use
About this tool
JS Minify brings Terser to the browser: paste a script, choose whether to compress and mangle, and get production-ready code with the percentage saved. Because it runs locally it works offline and never exposes your source. For the opposite direction use JS Unminify.
How to use it — quick steps
- 01
Enter the javascript
Type or paste the javascript in the field above, for example function greet(name) {. Nothing is uploaded.
- 02
Adjust the options
Pick the settings that fit your case; the defaults work for most people. Changes apply instantly.
- 03
Press "Minify JavaScript"
Press "Minify JavaScript" or Ctrl + Enter. The result appears instantly below the form.
Key features of this tool
Nothing leaves your browser
The processing is plain JavaScript that runs on your device: the text you paste is never uploaded to our servers or to anyone else.
Instant results
Results appear the moment you press the button, even for long inputs, and every block has copy and download actions.
Works everywhere
No installation, no account and no limits: the tool works on desktop and mobile, in any modern browser, as often as you like.
Frequently asked questions
Is the minified code equivalent?
Yes for standard code. Terser is used by webpack, Vite and Rollup; mangling only renames local identifiers, never properties or globals.
Why is there a syntax error?
Terser parses the code first; the error message points to the line. JSX and TypeScript are not supported, compile them first.
Are my files or data uploaded?
No. The tool is plain JavaScript that runs in your browser; the files or data you provide here are never uploaded to our servers.