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

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
TnX veRy Go0D
By Amir Mansouri on 05/11/2011
simply superb, this rocks! best way to deter copiers a tad bit too long.. (i am one :D )
On 16/10/2011
When code uses stings vars like var str = "some text" somevar or function call "some text" "some text"; output code rises error "missing ; efore statement".
On 11/10/2011
great job this is amazing great great great awesome work thank you very much.!! 100
By richy on 03/09/2011
Found this: http://www.cloudcomputingetc.com/2011/08/javascript-code-protection-compression.html
By Jinna on 02/08/2011
I tried to parse 8000 lines of javascript and it does not work :( But i love your tool tho.
By unagi on 30/07/2011
excellent project. moreso for bandwidth saving and also validation than anything else. If it doesn't work, it's usually an omitted semi-colon or something simple like that. easy enough to decode means easy enough to spot errors. I use it on every prject - tkank you folks!
On 29/06/2011

30 out of 73 comments shown. See all comments.

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

Comments :

Your Name (optional) :