What is JSNice?

JSNice is a new kind of statistical de-obfuscation and de-minification engine for JavaScript. Given a JavaScript program, JSNice automatically suggests new likely identifier names and types. JSNice is a system developed as part of the Statistical Program Analysis and Synthesis project.

What is JSNice useful for?

JSNice can be used for various purposes including:
  • Deminify obfuscated JavaScript code (most code on the Web is minified).
  • Suggest more appropriate identifier names for your non-obfuscated program.
  • Even propose likely types, automating the process of program annotation.

How does JSNice work?

JSNice uses advanced machine learning and program analysis techniques to learn name and type regularities from large amounts of available open source projects (currently, we have indexed over 10,000 JavaScript projects from GitHub). Then, given new JavaScript code, JSNice probabilistically infers newly suggested names and types for all of the local variables and function parameters.

Soon, we plan to release a complete write-up on the workings of JSNice.

How Precise is JSNice?

In our experiments, we found JSNice to be effective for deobfuscating minified code. On average, more than 60% of the identifiers are recovered to the same name as before the minification process. Further, as JSNice computes multiple ranked suggestions, we provide a UI to navigate through these suggestions and select alternative identifier names.

Comments / Questions?

For any comments/question about JSNice, contact Veselin Raychev and Martin Vechev


This service by ETH Zurich, Department of Computer Science, Software Reliability Lab, is free of charge. We accept only legal pieces of code. All entries are logged for research and improvement of service. ETH Zurich does not warrant any rights or service levels, nor does it acquire any rights on the code entered. Swiss law is applicable. The place of jurisdiction is Zurich, Switzerland. By entering code on this site, you warrant that all your entries are in your sole responsibility and you do not infringe any laws or third-party rights like copyrights and the like. ETH Zurich and its employees shall not be liable for any entries and for any damages resulting thereof. You agree to indemnify, defend and hold them harmless from any legal or financial demands or arising out of the breach of these terms of use, especially from third-party claims regarding infringement of copyrights and the like.