Make your JavaScript Application or HTML5 game protect itself with Jscrambler 4

Protecting your hard work has always been a priority. In the making of your latest HTML5 game, you invested lots of hours in developing your JavaScript code.

Unfortunately, everyone can read it just looking at the source code of the web page your script is running into. In other words, you wrote a script you are basically giving away for free.

By accessing to your source code, another programmer can:

* Violate your license agreement
* Steal secret algorithms
* Steal your code, to reuse it
* Leak altered versions to the Internet

Do you know how I am protecting my hard written lines of code? With Jscrambler.

I already blogged about Jscrambler in this post and in this other post and I have to say it’s the tool I am actually using to protect my commercial work for two years and believe me when I say I do care about my code.

With version 4, Jscrambler introduces a lot of new features, including a full control panel with a lot of customizable options:

jscrambler

Let’s make a quick example with the code used int he post Understanding HTML5 sprite animation with Phaser.

This is the original code:

With no setting specified, you can use Jscrabler to remove comments and adjust indentationation. Useful for lazy people like me who still use PSPad which has limited code formatting options:

The magic happens when you check some protection options and get a really unreadable code:

The game still works but I dare you to make some kind of reverse engineering on it.

One more test we can do is to try to beautify the script with tools like JSNice to see if things become a little more understandable.

This is the output:

It’s surely more readable, or let’s say at least it provides a good spacing and indentation, but there’s till too much effort to put in if you want to make a reverse engineering of the code.

This is why I use Jscrambler to protect and optimize my projects and that’s why I recommend this tool.

  • Jake Jensen

    I agree! I just started using Jscrambler for my new Phaser game and it’s saved me a lot of grief! Now I can have people test it out there in the wild without worrying about it being stolen.

  • Matthew

    I looked at the JScrambler website, and unless I’m misunderstanding it seems extremely expensive. $85 per month gets you a maximum of 2 applications protected. So someone with a lot of commercial JavaScript games would only be able to protect 2 of them per month for $85, or 5 per month for $255.

    Is that right Emanuele?

    Would you mind telling us how much you pay JScrambler and how many games you are protecting with it?

    • Emanuele Feronato

      You protect the application once, so if you are choosing the 5 applications plan you are developing 5 new applications each month.

      In my opinion, one application with 100 files should be enough

      • Matthew

        I see, so the plan allows you brand new applications every month. That makes more sense. Thanks. They really don’t make that clear on their website.

  • I’m unsure as to why you would use this subscription based library over something such as UglifyJS2 – https://github.com/mishoo/UglifyJS2. Perhaps I’m missing something, but this seems to provide similar functionality.

    • Emanuele Feronato

      Going to test it, then compare them

    • Charlie

      uglify does not protect the code, you can go back to the original with online tools

  • Christophe67

    Hi,

    May be interesting for professionnals or commercials projects , but very expansive.

    For myself I prefer obfuscators like :

    online version : https://javascriptobfuscator.com/Javascript-Obfuscator.aspx
    desktop version : https://javascriptobfuscator.com/downloads.aspx

    That’s enough to discourage tons of lamers/looters.

    regards.

    • Emanuele Feronato

      Going to test them too

    • Tsai

      Some online tools can easily reverse JSO, just a reminder if you’re using it.

    • Charlie

      JavaScript Obfuscator is not that hard to reverse I’m afraid