Javascript Obfuscator

Create a Packer-formatted copy of a small function for checking tool compatibility.

Create a Packer-formatted copy of a small function for checking tool compatibility.

How to use

  1. Load the add example and identify its original a+b expression.
  2. Obfuscate the example and copy the complete generated Packer wrapper.
  3. Paste that text into the companion unpacker and inspect the recovered code.

Worked example

Input

function add(a,b){return a+b;}

Expected result

eval(function(p,a,c,k,e,d){e=function(c){return c};if(!''.replace(/^/,String)){while(c--){d[c]=k[c]||c}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('4 3(1,0){2 1+0}',5,5,'b|a|return|add|function'.split('|'),0,{}))

Check the result

The recovered add function should still return a+b.

Continue with another guide

Cookie
We care about your data and would love to use cookies to improve your experience.

Learn how we use cookies