JS Pack/Unpack (eval)
Free online JS pack/unpack tool, eval encoding and restore
What is JS Pack/Unpack?
JS packing (also called eval-packing) converts JavaScript source code into an encoded string wrapped in an eval() call. This makes the code harder to read but does not provide real security. It is sometimes used to obfuscate JavaScript before deployment.
How to Pack or Unpack JavaScript
Paste your JavaScript code in the source area. Click Encode (Pack) to produce 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 into a string that is decoded at runtime using eval().
▶Does packing protect my code?
Not really. Packed code can be unpacked by anyone using tools like this one. It may deter casual inspection but is not a substitute for real code protection.
▶Does packed code run slower?
Yes, because the browser must decode the packed string and eval it at runtime. For production, use proper minification and tree-shaking instead.