Javascript Obfuscator

Javascript Obfuscator

Pack a small JavaScript function with a reproducible example.

Try this example

Load Sample, then select Obfuscate. Copy the resulting Packer text into the paired unpacker and compare the function.

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,{}))

The packed text is intended for compatibility testing. Browser-delivered code remains readable through analysis, so keep secrets on the server.

Related walkthrough · When to Format or Minify HTML, CSS and JavaScript


Avatar

DTool Team

Product Team

We build simple, reliable browser tools that make everyday digital work faster.

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

Learn how we use cookies