Guide
How to obfuscate JavaScript: online or with the CLI
To obfuscate JavaScript, protect a copy of your built .js file, choose a preset, and test the generated output before replacing the original. Start with the free online steps below or copy the npm command for local processing. Then compare the before-and-after examples to understand what each setting changes.
The Short Version
Build → obfuscate a copy → test → ship
Obfuscate the built, minified bundle, never your source tree. Keep the original and its source maps private, and run your tests against the protected copy before it is published.
RenameIdentifiers lose their meaning.
Hide stringsLiterals stop being searchable.
RestructureControl flow stops reading top to bottom.