Skip to main content
stringGeneratorMode controls the shape of generated identifiers, labels, property names, and string contents. Set it globally or override it for renameIdentifiers, specialsToStrings, or mangleProperties. mangled is the default

Compare modes

Some editors, minifiers, linters, and security tools handle zeroWidth identifiers poorly. Test every downstream tool before using this mode.

Select one mode

obfuscate.mjs
The seed makes built-in randomized choices repeatable. It is not a cryptographic key.

Override a transform

renameIdentifiers and specialsToStrings accept an object with their own stringGeneratorMode. Property mangling accepts the same field inside its property options.
obfuscate.mjs

Mix modes

Pass a nonempty array to sample modes uniformly. Repeating a mode increases its weight.
obfuscate.mjs
An empty array throws when a generator is created.

Obfuscator options

See how the global mode fits into ObfuscatorOptions.

Rename identifiers

See generated names applied to bindings and labels.
Last modified on August 22, 2026