Input

Unpacked Output

What Is the JavaScript Unpacker?

This JavaScript Unpacker restores packed JavaScript (including common eval-wrapped patterns) into readable code and beautifies JavaScript. Paste obfuscated or minified code; get readable output for debugging and analysis. The ECMAScript spec defines the language.

Packed scripts are often exactly the kind of thing you would rather not upload, and you don't have to: the unpacking happens inside this page. To go the opposite way and obfuscate code, use JavaScript Obfuscator. For formatting only, use JavaScript Formatter. For validation, use JavaScript Validator.

How to Unpack JavaScript

1

Paste or Upload

Paste packed JavaScript into the left panel or upload a .js file. Use Sample to load a packed snippet.

2

View Unpacked Output

The right panel shows unpacked code. If unpacking fails, the tool falls back to readable formatting and escape decoding.

3

Copy or Download

When the unpacked source reads cleanly, take it with Copy or Download. To try running it, use JavaScript Console.

JavaScript Unpacker Example

Here is an example of unpacking a P.A.C.K.E.R-style JavaScript payload.

Example: Packed console output

Packed input:

Input

Unpacked output:

Output

When the JavaScript Unpacker Helps

Use this when you receive packed JavaScript from third-party scripts, browser extensions, or suspicious payloads. Unpacking exposes the real code path for analysis, auditing, and debugging. For minified but unpacked code, use JavaScript Formatter.

Frequently Asked Questions

Is my data private?

Yes. The decoding is done by JavaScript in your own tab, and no part of the script gets sent to a server.

Does it unpack all packed scripts?

It handles common P.A.C.K.E.R-like wrappers. Some custom packers may require manual analysis after unpacking.

Can it fully reverse obfuscation?

It depends on the obfuscation. Simple patterns are reversed. Heavy obfuscation may leave some code hard to read.

Unpacker vs Formatter?

Formatter adds indentation only. Unpacker first attempts to reverse packed wrappers, then formats the result.

Is it legal to deobfuscate?

Use for debugging your own code, security research, or with permission. Check licenses and terms for third-party code.

Related Tools

ECMAScript. MDN JavaScript. Terser. Chrome DevTools. Babel.