JavaScript Obfuscator
Obfuscate JavaScript by mangling names, encoding strings and flattening formatting. Free online obfuscator that runs entirely in your browser.
Input
Result
The result appears here as you type.
What this tool is for
Obfuscation raises the effort needed to read shipped code: names become meaningless, string literals are encoded, structure is flattened. Be clear about what that buys you. Anything that runs in a browser can be read by whoever runs it, so this is a speed bump against casual copying, not protection for a secret.
How to use it
- Paste the JavaScript you want to obfuscate.
- Pick the level: name mangling only, or mangling plus string encoding.
- Test the output before shipping it.
Frequently asked questions
Can obfuscated code be reversed?
It can always be read with enough effort, and automated deobfuscators handle common patterns quickly. Never put a key, a token or a licensing check in client code and consider it hidden.
Does obfuscation slow the code down?
String encoding adds a decode step at startup and makes the file larger. For anything performance sensitive, minify instead.