Best Javascript Obfuscation tool / technique

Hi im new to javascript. I was reading obfuscation techniques over the web but cant decide which to choose? Can anyone please tell which are the best techniques or tools out there which are free to use but effective.

What are you trying to obfuscate? If you want to obfuscate a string for, say, email, I’m not sure how well that will work. SPAMbots keep finding ways around it.

If you want to obfuscate your JavaScript code… give it up. Ain’t happening. People will still be able to see your JS.

:slight_smile:

1 Like

Yes trying to obfuscate the whole code. But security is not the only concern here. Obfuscation as i understand it is also used to minimize the size of the code, in order to reduce the download size and minimize the page load times.

Also does performance as in execution of the page suffers due to obfuscation?

Thanks for the help :smile:

AH… okay… you’re not talking about obfuscation, you’re talking about minifying (removing all spurious white space to cut down on the file size.)

First of all, you CAN’T obfuscate HTML or JavaScript code. Period. The browser has to have clear HTML and JS in order to parse the data, and whatever the browser sees, the user can “View Source” (excepting in IE with HTTPS).

Secondly, with the increased speed and robust processing power of today’s computers, and increased RAM size on average, there is no reason to minify code. UNLESS users are using extremely slow DSL or dial-up internet connections.

V/r,

:slight_smile:

1 Like

This is beyond the scope of this question but for the record you can actually compile javascript to a nwjc snapshot. You could then embedd that into your application:

Not the the faint of heart and probs not what you where looking for but interesting stuff…

1 Like

Give a chance to http://www.javascript2img.com/ …

1 Like

This is a simple idea: embed your javascript code within an image, and so deceive the developer not know where your code is.

A bit faulty logic there.

It may fool newbies, but it won’t fool devs.
And if it doesn’t cause the site to trigger an alarm, anyone looking at the source is more than likely to lose trust in the site, leave it to never return, and run an anti-virus scan ASAP

Best to not even bother obfuscating. Maybe if the script is so massive it affects load time minification might be worth it.

Best advice, just write your cide and don’t worry much about anything other than if it works as intended.

2 Likes

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.