JavaScript Obfuscator
Make JavaScript harder to read by renaming variables, moving all strings into an array with optional hex or Base64 encoding, and compacting the code, with the size change shown.
- Free
- No sign-up
- Works on any device
About JavaScript Obfuscator
This tool makes your JavaScript harder to read without changing what it does. It uses the Terser parser to rename local variables and parameters, or top-level names too, into names like _0x1b3a, removes comments and whitespace, and can move every text string into one array that is read by index, with the strings left plain, written as hex escapes or stored as Base64. The size before and after is shown. Control-flow flattening and dead-code injection are not offered. Obfuscation only slows people down; it never protects secrets.
How to use JavaScript Obfuscator
- Paste the JavaScript or open a .js file.
- Choose how names are renamed, whether strings move into an array and how they are encoded.
- Copy or download the result and run your tests on it before publishing.
Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.
Also known as
Frequently asked questions
Does obfuscation protect my code or secrets?
No. Anyone can run it, step through it in a debugger or reverse it with a tool, so never put keys, passwords or licence checks in client-side code and rely on obfuscation.
Will the obfuscated code behave the same?
It should, because renaming follows scope rules and strings keep their values. Top-level renaming can break other scripts or HTML attributes that call your functions by name, so test before you ship.
Why can the output be larger than the input?
The string array, the lookups and the longer names add bytes, especially for short scripts. Base64 encoding makes the array about a third bigger, while removing whitespace saves some of it back.
Is JavaScript Obfuscator free?
Yes. JavaScript Obfuscator on Toolipedia is free to use, with no sign-up and no watermark.
Is it safe to use?
Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.
Does it work on my phone?
Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.
Do I need an account?
No. Just open the page and use the tool. There's no sign-up and no email needed.