JavaScript Minifier
The JavaScript minifier removes comments and unnecessary whitespace while leaving every identifier, string and regular expression untouched. It is a safe, conservative squeeze rather than a full compressor, so the code behaves exactly as before.
Your result will appear here.
Not sure where to start? Use Load example.
Results update automatically and are calculated on your device. Nothing you type is sent to a server.
Runs in your browser. Processing happens entirely in your browser. Nothing you enter is sent to Delimiter.live.
How to use the JavaScript Minifier
- Paste the script you want to compress.
- Decide whether comments should be removed.
- Check the size saving and copy or download the result.
Example
// hi
function a() {
return 1;
}
function a(){return 1;}
Common use cases
- Compressing a small inline script in a project without a build pipeline.
- Stripping developer comments before shipping a snippet.
- Reducing the size of a script stored in a CMS field.
Limitations and things to watch for
- This minifier only removes comments and whitespace. It does not rename variables, drop dead code, fold constants or perform any of the transformations a compiler such as Terser or esbuild applies, so the saving is smaller — typically 20 to 40 percent rather than 60 or more.
- Whitespace that is required — between keywords and identifiers, and where removing it would trigger automatic semicolon insertion — is always preserved.
- For production bundles, use a real build tool. This is for small scripts and quick fixes.