Click here to Skip to main content
15,348,570 members
Articles / Programming Languages / Javascript
Posted 4 Mar 2010

Tagged as


4 bookmarked

Decoder for Dean Edwards' JavaScript Packer

Rate me:
Please Sign up or sign in to vote.
3.40/5 (3 votes)
4 Mar 2010CPOL
This short article shows how to decrypt and beautify code encoded with Dean Edwards' Javascript Packer.


If you are a website admin, you might want to know if the JavaScript provided to you is malicious. This code will decrypt the JavaScript code encrypted with Dean Edwards' Javascript Packer. JavaScript encoded with Dean Edwards' JavaScript Packer begins with this line:


Using the Code

This code is a simple HTML page with few lines of JavaScript.

<html xmlns="" >
<title>Decoder for Dean Edwards' Javascript Packer</title>
<script language="javascript" type="text/javascript">
function Decode() {
eval("var value=String" + txtInput.value.slice(4));
txtOutput.value = value;
<textarea id="txtInput" style="width: 632px; height: 253px"></textarea>
<br />
<input id="btnDecode" style="width: 198px" 
type="button" value="Decode" onclick="Decode()" />
<br />
<textarea id="txtOutput" style="width: 630px; height: 273px"></textarea>
<br />
<a href="">Dean Edwards' JS packer</a>
<br />
<a href="">Javascript unpacker and beautifier</a>

Points of Interest

After you decode the JavaScript with the page, beautify it with Javascript unpacker and beautifier.

You can read more about Dean Edwards' JS packer's inner workings on Golan Yosef blog.


  • 5th March, 2010: Initial post


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

Igor Krupitsky
Web Developer
United States United States
Igor is a business intelligence consultant working in Tampa, Florida. He has a BS in Finance from University of South Carolina and Masters in Information Management System from University of South Florida. He also has following professional certifications: MCSD, MCDBA, MCAD.

Comments and Discussions

GeneralJust what I was looking for Pin
geekgirljas4-Apr-10 22:57
Membergeekgirljas4-Apr-10 22:57 
GeneralMy vote of 1 Pin
JLuterek5-Mar-10 5:22
MemberJLuterek5-Mar-10 5:22 
GeneralRe: My vote of 1 Pin
Igor Krupitsky5-Mar-10 16:33
MemberIgor Krupitsky5-Mar-10 16:33 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.