Need fine-grained control over your JavaScript minification? Our free Terser Config Generator builds a Terser configuration in seconds — toggle compression and mangling, choose how comments are handled, then copy the ready-to-use JSON.
Terser Config Generator
How to Use
- Tick the compress and mangle options you want.
- Choose whether to keep class and function names.
- Decide how comments should be handled.
- The JSON updates live — copy it into terser.config.json or your build setup.
Key Features
- Generates a valid Terser configuration.
- Covers compress, mangle, top-level mangling, name preservation, comments and source maps.
- Updates live as you change any option.
- One-click copy to clipboard.
- Runs entirely in your browser — free with no sign-up.
FAQs
What is Terser?
Terser is a JavaScript minifier and mangler. It is the standard choice for compressing modern ES6+ code in production builds.
What is the difference between compress and mangle?
Compress applies optimisations that shrink your code’s logic, such as removing dead code. Mangle renames local variables and functions to shorter names. Most production builds use both.
Should I drop console statements?
console calls add weight and can leak debug information, so many production builds remove them. Keep them while developing so you can still debug.
Do I need an account to use this tool?
No. Like every tool on ToolsFreeHub, the Terser Config Generator is free and works without signing up.