JavaScript minification removes whitespace and comments and shortens local variable names, producing a smaller file that downloads and parses faster. This tool uses Terser, the same engine behind many build pipelines, and reports how many bytes you save.
Common uses
- Tidying a snippet before pasting it into a pull request or ticket
- Shrinking CSS or JavaScript for a quick size check
- Making a one-line SQL query from a log readable
Frequently asked questions
- Is minified code safe to run?
- Terser preserves behavior, but code that relies on function names or eval can break, so test the output.
- Should I minify in the browser or at build time?
- Build tools are better for real projects. This page suits quick checks and snippets.