JavaScript Minifier

Compact JavaScript with Terser while keeping compression and identifier mangling disabled. Paste source, check errors and copy the result.

Generate compact JavaScript for a snippet while keeping identifier names readable. Terser parses and prints the program with compression and mangling disabled and comments removed.

  • 100% free
  • No registration
  • On your device
  • Modern browser
  1. 1Enter details
  2. 2Adjust options
  3. 3View result
ResultLive

Your input stays on this device for this operation. We don’t upload or store it.

About JavaScript Minifier

Generate compact JavaScript for a snippet while keeping identifier names readable. Terser parses and prints the program with compression and mangling disabled and comments removed.

Identifier retention

Terser name mangling is disabled.

Comment-free printing

The configured printer removes comments.

How to use JavaScript Minifier

  1. 1

    Paste JavaScript source

    Paste JavaScript source in Source text.

  2. 2

    Inspect the compact program

    Press Process and inspect the result or parser error.

  3. 3

    Review notices and test

    Check comment obligations and run the relevant project tests before using the output.

Formats and practical limits

JavaScript source in, compact source out.

  • Input is limited to 100,000 JavaScript string units. The tool does not execute the submitted code.
  • Comment removal can affect license notices or build annotations. Bundling, transpilation and source map export are outside this workflow.

Practical example

function sum(a, b) { return a + b; } becomes function sum(a,b){return a+b}.

Further reading

Frequently Asked Questions

2 answers
Are variables renamed?

Identifier mangling is disabled.

Can I submit TypeScript or JSX?

Use JavaScript accepted by the configured parser. There is no transpilation step.