JavaScript Minifier

Minify JavaScript locally and compare the original and output byte sizes.

Frontend & Design
Preparing your workspace…
Input
Output
Your result will appear here.

How to use

  1. Paste the source, open a UTF-8 file or try the Sample.
  2. Choose the options and run the conversion or enable Auto run.
  3. Review the result, then copy a selection or download the complete text.

JavaScript Minifier

Paste JavaScript and select Minify. Terser parses and optimizes the code without running it. Input and output sizes are measured as UTF-8 bytes, with a percentage size reduction.

Processing stays in your browser. DevToolsy does not receive the pasted data or selected file.

Input and processing

Select ES module for module input. Local variable shortening is optional and disabled by default. License comments can be kept; other formatting and comments may be removed.

Worked example
Input
/*! Example license */
function greeting(name) {
  const message = "Hello, " + name;
  return message;
}
console.log(greeting("Ada"));
Output
/*! Example license */
function greeting(name){return"Hello, "+name}console.log(greeting("Ada"));

This example uses the default settings.

Result and limitations

TypeScript and JSX need compilation before this tool. Minification is not type checking or application testing, and output should be tested in its intended runtime.

Using the output

Review the result, then copy a selection or download the complete text.

Processing limits

UTF-8 input up to 1 MiB; output up to 8 MiB. Processing stops after 30 seconds.

?

Frequently asked questions

How is JavaScript compressed?

Paste JavaScript and select Minify. Terser parses and optimizes the code without running it. Input and output sizes are measured as UTF-8 bytes, with a percentage size reduction.

Which options affect the generated code?

Select ES module for module input. Local variable shortening is optional and disabled by default. License comments can be kept; other formatting and comments may be removed.

Does minification validate application behavior?

TypeScript and JSX need compilation before this tool. Minification is not type checking or application testing, and output should be tested in its intended runtime.

Is the input uploaded?

Processing stays in your browser. DevToolsy does not receive the pasted data or selected file.

Can I keep the result?

Review the result, then copy a selection or download the complete text.

Find your next tool

Language

Switch language? Your current work will be cleared. Copy or download it first.