Canonical: https://toolipedia.app/javascript-deobfuscator

# JavaScript Deobfuscator

Unpack eval packers, decode hex strings, restore a plain string array and re-indent packed or obfuscated JavaScript so you can read it, without ever running the code.

Breadcrumbs: Toolipedia > Developer tools > Code and developer utilities > JavaScript Deobfuscator

## About JavaScript Deobfuscator

Obfuscated JavaScript is hard to review, but many tricks are simple patterns. This tool unpacks Dean Edwards style eval(function(p,a,c,k,e,d)) packers by rebuilding the word list, decodes eval(atob(...)) and eval(unescape(...)), turns hex and Unicode escapes into letters, joins split strings, calls String.fromCharCode with plain numbers, writes 0x1f as 31, !0 as true and obj['name'] as obj.name, restores a plain string array, and re-indents everything. It never runs the code, so what an eval receives at run time stays hidden and is flagged instead.

## How to use JavaScript Deobfuscator
1. Paste the packed or obfuscated JavaScript, or open a .js file.
2. Leave the clean-up steps ticked, or untick any that you do not want.
3. Read the table of what changed, check the flagged eval calls and copy the readable code.

## Why use this tool?
- Private: everything happens in your browser. Nothing you enter is uploaded.
- Free, with no sign-up, no watermark and no limit on how often you use it.
- Works on phones, tablets and computers: Android, iPhone, Windows, Mac and Linux. Nothing to install.

## Also known as
- javascript deobfuscator
- unpack packed javascript
- deobfuscate js online
- eval packer unpacker
- decode obfuscated javascript

## Frequently asked questions

### Does this tool run the obfuscated code?

Never. It only matches patterns and decodes constant text, so you can inspect suspicious scripts without risk. Anything that needs the code to run, like a decoder function, stays as it is.

### What kinds of obfuscation can it not undo?

Renamed variables, control-flow flattening, string decoder functions and rotated string arrays that are rearranged at run time. It tells you when it finds a string array it cannot safely resolve.

### Why is my packed script still hard to follow after unpacking?

Unpacking restores the original source, but if the author also minified it the names are short and the logic is dense. Re-indenting helps, while the names cannot be recovered.

### Is JavaScript Deobfuscator free?

Yes. JavaScript Deobfuscator on Toolipedia is free to use, with no sign-up and no watermark.

### Is it safe to use?

Yes. Everything is worked out in your browser, and nothing you enter is sent to our server.

### Does it work on my phone?

Yes. It works in any modern browser on Android and iPhone, as well as on tablets and computers. There's nothing to install.

### Do I need an account?

No. Just open the page and use the tool. There's no sign-up and no email needed.

## Related tools

More free tools that go well with JavaScript Deobfuscator:
- [JavaScript Obfuscator](https://toolipedia.app/javascript-obfuscator)
- [Protobuf Wire Format Decoder](https://toolipedia.app/protobuf-wire-format-decoder)
- [Regex Escape Tool](https://toolipedia.app/regex-escape-tool)
- [JavaScript minifier](https://toolipedia.app/js-minifier)
- [Database Backup and Restore Command Builder](https://toolipedia.app/database-backup-and-restore-command-builder)
