JavaScript Obfuscator — Protect Your JS Code

Make your JavaScript hard to read, copy or modify — rename identifiers, move and encode strings, flatten control flow and add dead code — with presets that balance protection against size and speed.

Runs in your browserUpdated
Protection

Your data never leaves your computer. All processing happens 100% locally in your browser.

How to use the JavaScript Obfuscator

  1. Paste the JavaScript you want to protect.
  2. Pick a protection level — Light keeps the code fast and small, Strong makes it much harder to reverse.
  3. Click Obfuscate, test the result, then copy or download it.

What obfuscation does

Obfuscation transforms working code into an equivalent version that is very hard for people to read. This tool uses the open-source javascript-obfuscator engine: identifiers are renamed to meaningless hex names, strings are moved into an encoded array, and at higher levels the control flow is flattened into a state machine and dead code is injected.

Choosing a level

  • Light — renaming and string array; small overhead. Good for most front-end code.
  • Medium — adds control-flow flattening, string encoding and splitting. Code grows and runs slower.
  • Strong — adds dead code injection and more aggressive transforms. Use only on code that isn’t performance-critical.

Know the limits

Obfuscation slows reverse engineering down — it doesn’t make code secret. Anything that runs in a browser can eventually be analysed, so never put API secrets, passwords or license keys in client-side code. Always test the obfuscated output, and keep your original source safe: obfuscation can’t be undone.

Private by design

Obfuscation runs entirely in your browser — your code is never uploaded, so it’s safe for proprietary projects.

Tools that pair well with the JavaScript Obfuscator

  • JavaScript Minifier — Paste JavaScript and get production-ready minified code from Terser — the same engine used by Vite, webpack and Rollup — with real before/after and gzipped sizes.
  • JavaScript Formatter — Unminify and pretty-print JavaScript, JSON or JSX with your preferred indentation and brace style — or strip whitespace and comments with a verified minifier.
  • AES Encrypt & Decrypt — Protect a note, secret or config value with a password using AES-256 — or decrypt text produced by openssl enc.
  • Hash Generator — Compute MD5 and SHA hashes of any text or file instantly, create HMAC signatures, and paste an expected checksum to verify a download.

Frequently asked questions

Can obfuscated JavaScript be deobfuscated?
Partly. Tools can reformat and simplify it, but renamed identifiers and flattened logic make understanding it slow and costly. Treat obfuscation as a deterrent, not encryption.
Does obfuscation slow down my code?
Light protection adds little overhead. Control-flow flattening and dead code (Medium and Strong) can make code noticeably larger and slower — test before shipping.
Is obfuscation the same as minification?
No. Minification only removes whitespace and shortens names to reduce size; obfuscation deliberately makes code hard to understand and often makes it bigger.
Can I install JavaScript Obfuscator as a web app and use it offline?
Yes. JavaScript Obfuscator is an installable web app (PWA) — installed from your browser, not downloaded from an app store. Click Install app at the top of this page in Chrome or Edge (Windows, macOS, Linux, ChromeOS) or on Android, use Share → Add to Home Screen on iPhone and iPad, or File → Add to Dock in Safari 17+ on a Mac. It then opens in its own window with its own icon, and because it runs entirely in your browser it keeps working offline. Firefox on desktop can’t install web apps. How installing works.

Related tools