Code · Made a little simpler
JavaScript Minifier
Minify JavaScript on your device, optionally optimize expressions and generate a separate source map. Compare UTF-8 byte sizes and save the output files.
Debug a minified script with a source map
Free to useNo account neededProcessed on your device
Your workspaceProcessed on your device
JavaScript Minifier: how to use it
- Paste JavaScript or select a local source file. Leave optimization off to start with compact formatting.
- Enable a source map if you need to trace generated code, then select Minify JavaScript.
- Download minified.js and, when enabled, minified.js.map. Keep the two files together for debugging.
Limits and notes
Input can contain up to 1,000,000 UTF-16 code units. Local files must be valid UTF-8 and at most 4 MiB. Identifier mangling is disabled. Compression can simplify expressions and remove unused code when enabled. Comparisons show UTF-8 bytes before transfer compression.
How your privacy works →JavaScript Minifier: common questions
Does the source map include the original text?
Original text is optional. Enable Include original source in map to add the input to the sourcesContent field.
Why is a very short script larger with a map?
Map generation appends a sourceMappingURL comment to the script. Its size can exceed whitespace savings for short inputs.