JavaScript Compression Tool

Minify and restore readable JavaScript format
Input JavaScript 0 B · 0 lines
Output 0 B · 0 lines
Processing

Settings

Restore Format Settings

Number of characters used for each indentation level. Default is four spaces.
Choose spaces or tab characters for indentation.
Controls whether opening and closing braces stay on the same line or move to separate lines.
Use 0 to disable forced line wrapping.
Limits consecutive blank lines retained from the original source.
Keeps reasonable line break locations found in the input code.
Adds spaces immediately inside parentheses where supported.
Adds a final newline at the end of the output file.

Compression Settings

Controls output syntax compatibility. It does not transpile newer syntax to older browsers.
More passes may reduce size slightly but require more browser processing time.
License mode retains comments containing license, preserve, copyright or leading exclamation marks.
Applies safe Terser compression transformations in addition to whitespace removal.
Renames local variables to shorter names to reduce output size.
Allows top-level declarations to be removed or renamed. Enable only when the file is self-contained.
Enable when the input contains import or export module syntax.
Useful when code depends on Function.name or stack trace readability.
Useful when code depends on class names at runtime.
Removes console calls. Do not enable if console output has functional side effects you need.
Removes debugger statements from compressed output.

Preference Settings

Stores only language and tool preferences in your browser cookie. Source code is never stored in cookies.