Logic, but in a different way

Daft Logic

Online Javascript Obfuscator

Introduction

This javascript obfuscator is intended to be used as a resource to convert human readable javascript to a more shrouded code. This serves two purposes:

Input

Output

How it Works

Generally the code from the fist textarea is copied into the second one. In between that here are numerous functions that each are triggered by the options/check boxes. So if none of the checkboxes are on, there will be no change in the code.

Note : If you get errors with the output code, it may be because your source does not have semicolons (;) terminating each line.

Please report any bugs, fixes or suggestions to help make this tool better and remember, always keep the original code!

Remove Line Breaks

Loop through all lines in the text area. Looking at each line one-by-one, if a line has no semicolon at the end, add one and then join it to the line previous

Remove Comments

Loop through all lines in the text area. Looking at each line one-by-one, trim all white space from the line. Then check the fist and second characters in the line. If they are both forward slashes i.e. / , then remove that line.

Further Uses and Ideas

Version History

Version 1 (09/06/2008) - The Beginning

Version 2 (09/06/2008) - Simple Options

Version 3 (24/12/2008) - Remove spaces option added

Version 4 (24/12/2008) - adapt http://joliclic.free.fr/php/javascript-packer/en/

Version 5 (08/01/2009) - Use POST variables for AJAX to increase maximum length

Relevant Links

Previous Comments For This Page

Now this is awesome
On 20/01/2014
eval() function is insecure...
By security on 03/12/2013
Great obfuscator, thank you very much!
By Bernat on 26/11/2013
Greate
By Tanzeel on 03/11/2013
This is now removing spaces in string...?
On 10/09/2013
good tool but how we can download this tool.
On 18/08/2013
shield4j.com is an online Java bytecode obfuscator and encrypter
By Koka on 28/07/2013
Good But Not Best...........
By Musab Hussain on 13/03/2013
Absolutely sucks. De-obfuscated in seconds, literally: just run : for(var i in window) { console.log(window[i]); } or alert();
By Shripad K on 03/03/2013
saaas
On 15/02/2013
Pichabrava say: Pichear bravos y bravas, libertad para vuestras pichas! Good job team, fine work!
By Pichabrava on 22/01/2013
Good job. It obfuscates large js code with cirillic symbols fast and fine.
By Miclech on 15/01/2013
special chars problem "%u015E%u0130%u011E%u0131"
By musa on 01/01/2013
Best Tool , Great Job, supports HTML5 nicely
On 30/12/2012
doesn't fully obfuscate strings, there are other online js obfuscators that do
On 05/10/2012
Great tool
By Souvik on 21/09/2012
The filesize of my js has been greatly reduced, but I can't use this on scripts that incorporate dynamic PHP content. My php variables get obfuscated too. Any suggestions?
By o11y_75 on 18/09/2012
Great job!
By anand K on 18/09/2012
A brilliant tool. Thanks for sharing.
By Peter on 30/08/2012
thank you!
By r on 25/07/2012
A waste of time. Too easy to decode the obfuscated code. Simply replace eval by alert, document.write or something similar.
By rubendj on 25/06/2012
nice tool...
By Lawrence Bryant on 12/06/2012
thanks
On 03/05/2012
awesome
On 23/03/2012
Great tool!
By Alexandru Bagu on 12/01/2012
OUTSTANDING - THANK YOU!
On 04/01/2012
Excellent Work guys!! Thanks a lot!
By Israel Ortega on 28/12/2011
good work
By saintush on 19/12/2011
Best javascript obfuscator I have used. Cut a 44770 byte file to a 23858 byte file! That's nearly half the file size, the script runs faster now :)
By Con on 17/11/2011
Great! is very interesting and useful
By undest on 16/11/2011

30 out of 80 comments shown. See all comments.

Add your own comment below and let others know what you think:

Comments :

Your Name (optional) :