javascript-obfuscator /javascript-obfuscator
A powerful obfuscator for JavaScript and Node.js
★ 16,333⑂ 1,746👁 183⑃ 486● 927▤ 244
+0
日增长
16,333
stars
1,746
forks
183
watchers
486
prs
927
issues
244
releases
README
JavaScript obfuscator !logo --- :rocket: Obfuscator.io with VM Obfuscation Obfuscator.io adds VM-based bytecode obfuscation to this package - your JavaScript functions are compiled to custom bytecode that runs on an embedded virtual machine. Each build produces unique opcodes and VM structure, making reverse engineering and automated deobfuscation dramatically harder. | Protection goal | Free (this package) | obfuscator.io | | --- |-----------------------------------------------------------------------------------|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------| | Rename identifiers | ✅ variable/function renaming | ✅ + VM-local symbols never exposed as JavaScript | | Obscure strings | ✅ string array + base64/rc4 | ✅ + strings embedded in bytecode constants | | Obscure control flow | ✅ control flow flattening | ✅ full bytecode virtualization, vmJumpsEncoding (runtime-computed jump targets), vmDeadCodeInjection (fake bytecode sequences) | | Resist decompilation | ⚠️ output is still JavaScript | ✅ custom opcodes, vmStatefulOpcodes (position-dependent opcode mapping), vmMacroOps (fused instructions), vmDecoyOpcodes (fake opcode handlers) | | Resist automated LLM-based analysis | ❌ fully vulnerable (no LLM-specific defenses) | ✅ bytecode encryption + anti-LLM defenses in vmSelfDefending and vmDebugProtection | | Encryption | ✅ stringArrayEncoding (base64/rc4 on extracted strings) | ✅ vmBytecodeEncoding (per-instruction encoding), vmBytecodeArrayEncoding (whole bytecode array as single block) | | Anti-debugging | ✅ debugProtection (freezes browser DevTools) | ✅ vmDebugProtection (multi-layered anti-debugging and anti-analysis defenses) | | Tamper detection | ✅ selfDefending (breaks if beautified) | ✅ vmSelfDefending (multi-layered tamper detection, anti-hooking, anti-reverse-engineering protection) | | Runs offline, no network | ✅ | ❌ uses obfuscator.io API (requires tok
Top issues
#753[Feature Request] Obfuscate Global Variables6 comments · 2020-09-19#1214NestJS couldn't log some class names5 comments · 2023-11-09#1304Add a -silent or -quiet option to suppress logs4 comments · 2025-02-26#773[Improvement] Numbers to expressions improvement4 comments · 2020-10-04#1317how to not convert numbers into hexadecimal?2 comments · 2025-06-27#1229Chrome Extension Manifest v3 Service Worker2 comments · 2024-01-11#1465High severity security: [email protected]1 comments · 2026-10-24#1128[Bug]: Duplicated names of class and functions in its static block1 comments · 2022-10-31
Discussions
#1329Working on VM-based obfuscation1 comments · 2025-11-08#1328Inline SourceMap in differents files1 comments · 2025-10-31#1322how to deofuscator the result?0 comments · 2025-09-30#1318How to use the command line in Windows?1 comments · 2025-07-08#1315Avoiding redeclarations1 comments · 2025-06-16#1303Obfuscate java and swift code0 comments · 2025-02-25#1268How to keep class names?1 comments · 2024-07-11#1260Are webpack-obfuscator options syntax exactly the same as javascript-obfuscator?1 comments · 2024-06-11
Latest release
5.10.1 version 5.10.1 2026-11-12Fixed controlFlowFlattening changing let and const declarations into var inside functions passed as call arguments or used as operands, when var is the prevailing kind of variables. Fixes https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1471 Fixed controlFlowFlattening turning a x in obj private brand check into invalid code. Fixes https://github.com/javascript-obfuscator/javascript-obfuscator/issues/1472 Fixed an escaped 'use\x20strict' directive being emitted as an actual 'use strict' directive. Fixes https://github.com/javascript-obfuscator/javascript-obfuscator/iss