JS Pack/Unpack (eval)
Free online JS pack/unpack tool, eval encoding and restore
What Is JS Pack/Unpack?
JS packing (also known as eval packing) converts JavaScript source code into an encoded string wrapped inside an eval() call. This makes the code harder to read but provides no real security. It is sometimes used to obfuscate JavaScript before deployment.
How to Pack or Unpack JavaScript
Paste your JavaScript code into the source area. Click Encode (Pack) to generate the eval-encoded version. Click Decode (Unpack) to reverse the process and recover readable JavaScript.
▶Is JS packing the same as minification?
No. Minification removes whitespace and shortens variable names but keeps the code as valid JavaScript. Packing encodes the code as a string, which is decoded at runtime using eval().
▶Can packing protect my code?
Not really. Packed code can be unpacked by anyone using a tool like this one. It may deter casual viewing, but it is no substitute for genuine code protection.
▶Does packed code run slower?
Yes, because the browser must decode the packed string and execute eval() at runtime. For production, use proper minification and tree-shaking instead.
If this tool has been helpful to you, consider buying me a coffee.
Buy me a coffee