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

Its simply best. Those who are complaining, I am certain, they are not properly doing it. Ppl, please only put the code in here, not the html tags.
By rlsking.com on 05/11/2009
Awesome! It works perfectly.
By Dh on 02/11/2009
does this handle Function object?
On 23/09/2009
Why should anyone have to obfuscate their code. Didn't you learn by reading someone else's code?
By javabeans on 26/08/2009
I'm afraid it didn't work for me, like every other obfuscator I've tried.
By Buchow on 02/08/2009
works great!! i'd love to see the source thanks
On 06/05/2009
I used a java script. this creates an output but the browser simply displays the obfuscated code when click on the html. hence, this thing does not reallt work for me. write to me: mannharleen@gmail.com
By harry. on 13/04/2009
works great!!!
On 27/03/2009
No luck -- the text which was output is not readable by a browser.
By Don on 23/03/2009
It works efficiently, clean output, thanks
By Ken on 13/01/2009
Please clear your internet cache and try again.
By Daft Logic on 08/01/2009
it's not working i'm usinf ff and ie even g chrome
On 08/01/2009
this sucks big time, barely leaves 20% of a 8kb sized JS..
On 21/12/2008

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

Comments :

Your Name (optional) :