JavaScript Deobfuscator

Decode escaped strings and lay scrambled JavaScript out so you can read it

Input

Decoded Output

Paste your input on the left and the result shows up here.

Or drop a file on this box, , or .

What does this JavaScript deobfuscator do?

Someone hands you a minified or scrambled JavaScript file and you want to know what it does. This page makes two passes. It turns \x48\x69 and \u00e9 escapes back into the characters they stand for, and it breaks the code onto one statement per line with indentation. It does not rename variables or unpack the string arrays that javascript-obfuscator builds, and it cannot undo the name mangling Terser applies.

According to Wikipedia, obfuscation makes code intentionally harder to read while preserving the semantics defined by the ECMAScript spec. If you want to compare results with another tool, projects like de4js tackle the same problem.

Both passes run in this tab. The code you paste is not sent anywhere.

How to Use the JavaScript Deobfuscator

Paste, read, then copy what you need. The output updates on its own.

1

Paste, Upload, or Load Sample

Paste the scrambled JavaScript into the left panel, open a .js file with Upload, or press Sample for a typical string-array snippet.

var _0x1a=['\x6c\x6f\x67','Order\x20ORD-1001'];console[_0x1a[0]](_0x1a[1]);
2

Read the Decoded Output

The right panel shows the code with its escapes decoded and one statement per line. An escape that would decode to a quote, a backslash or a line break is left as written, so every string still closes where it did.

3

Download or Copy

Use Copy to take the result, or Download to save deobfuscated.js and open it in your editor. Treat it as a study copy: the layout pass is a simple scanner rather than a full JavaScript parser, so a regex literal or template string can come out with odd spacing.

When You Would Use This

Checking a Suspicious Script

A browser extension or a pasted snippet carries a block of \x escapes. Decoding them shows the URLs and function names it calls before you decide whether to trust it.

Reading a Minified Bundle

A production bundle on one line is hard to step through. Laid out one statement per line it is easier to find the function a stack trace points at.

Seeing What an Obfuscator Produced

Run your own code through an obfuscator, paste the result here, and you can see how much a reader can recover with no special tools.

Making Escaped Strings Readable

Generated code often writes every non-ASCII letter as \u00e9. Decoded, a translation table or an error message reads like normal text again.

Common Questions

Is my code stored?

No. Decoding and layout both run in this tab, and the code is not uploaded or saved.

Will the output still run?

Usually, but read it rather than run it. Escapes are only decoded when the character is safe inside a string, yet the line-breaking pass is not a real parser, so check the result before you execute it.

Does it rename the _0x variables?

No. Names such as _0x1234 stay as they are. Renaming them safely needs scope analysis from a real parser, which this page does not have.

Does it unpack string arrays?

No. In the Sample, console[_0x1234[0x0]] still looks the name up at run time. The escapes inside the array are decoded (Hello\x20World becomes Hello World), but the values are not substituted into the code.

Which escapes does it decode?

\xNN and \uNNNN, anywhere in the file. One that would produce a quote, a backslash, a line break or another control character is kept as written, and so is \\x41, where the backslash itself is escaped.

Does it work with large files?

Yes, depending on your device. Both passes are a single scan over the text.

Other JavaScript Tools

After decoding, the code is easier to read but rarely finished. Running it through the formatter, checking it with the validator, or porting the parts you keep to TypeScript are the usual next moves: