GenerateIt

Javascript Deobfuscator

The online JavaScript Deobfuscator, also known as a JavaScript Unpacker, is a powerful tool designed to decode obfuscated or packed JavaScript source code. Obfuscation is often used to make code difficult to read by transforming it into a compressed or scrambled format, which can make debugging, reviewing, or modifying the code challenging. This tool reverses that process by restoring the JavaScript to a more readable and structured form.

By deobfuscating the source code, the tool helps reveal the original logic, variable names (where possible), and code structure, making it significantly easier to understand how the script works. This is especially useful when analyzing third-party scripts, debugging minified code, or learning from existing JavaScript examples.

Once unpacked, the restored JavaScript code can be safely reviewed, revised, or edited as needed. Whether you are troubleshooting an issue, optimizing functionality, or simply trying to understand how a script operates, this tool provides a quick and convenient way to turn complex, unreadable JavaScript into clean, human-readable code.

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong.

Buy me a coffee

Obfuscated or minified code

Readable code

Your code is unpacked in your browser and nothing is uploaded.

How to use it

The javascript deobfuscator is a handy little tool that will decode javascript files that have been obfuscated.

  1. Add your codePaste obfuscated or minified JavaScript into the editor above, or use Open file to load a .js file.
  2. DeobfuscateClick 'Deobfuscate Code'. If the tool finds a packed eval(function(p,a,c,k,e,d)...) wrapper it unwraps it first, then lays the result out on multiple lines with proper indentation either way.
  3. Review the resultThe result box says whether a packed wrapper was found and unwrapped, and how many layers, so you know what actually happened.
  4. Copy or downloadClick Copy to put the readable code on your clipboard, or Download to save it as a .js file.

Good to know

Handles multiple layers

Some packed code is packed more than once. This tool keeps unwrapping as long as it finds another packed layer, up to a sensible limit, so you get back to real source in one click.

Variable names aren't recovered

If the code was also obfuscated with shortened variable names, unpacking restores the code's structure and logic but not the original names — those were never stored anywhere to begin with.

Not every obfuscation style is covered

This tool reliably reverses the classic "Packer" eval-wrapper scheme used by most obfuscator tools. Other techniques, like control-flow flattening or string-array encoding, are not unwrapped — the code is still reformatted for readability, just not decoded further.

Frequently asked questions

What kind of obfuscated code does this handle?

It specifically recognises the classic "Packer" eval-wrapper (code starting eval(function(p,a,c,k,e,d){...}(...))), which is what most online JavaScript obfuscators, including the one on this site, actually produce. Other obfuscation techniques are not reversed, only reformatted.

My code wasn't packed — what happened?

If no packed wrapper is found, the tool simply reformats your code onto multiple lines with consistent indentation. This is also useful on its own for reading minified JavaScript.

Will the variable names come back?

No. If a name was shortened during obfuscation, the original name was never kept anywhere, so there is nothing to restore. Only the code's structure and logic come back.

Why does it say my code could not be read?

The tool reads through your code before changing anything, and an unusual or unterminated string, comment or template literal can stop it. Your original input is never altered when this happens.

Is my code uploaded?

No. Both the unpacking and the reformatting happen in your browser, and nothing is sent anywhere.

Related tools

Javascript Obfuscator

This tool will obfuscate your Javascript source code to help protect it from theft or unauthorised reuse.

Javascript Validator

This tool will validate your Javascript source code and display any errors that might need to be fixed.

JSON Tree Viewer

JSON Tree Viewer is an online tool that will convert your raw json data into a readable tree view structure.

If this site has been useful, we’d love your support! Consider buying us a coffee to keep things going strong.

Buy me a coffee