Developer

JavaScript Deobfuscator

Details

How to use JavaScript Deobfuscator

What the tool does, how to run it, and what to expect from the result.

How to deobfuscate JavaScript

Paste the code. With all three options on, String.fromCharCode calls with integer arguments are evaluated to their strings, \x and \u escapes inside string literals are decoded back to readable characters, and the result is re-indented.

The code is never executed. That is a deliberate limit, and it is why eval, atob, and string-array lookups are left untouched: unwrapping those requires running the script, which is the last thing you want to do with something you are investigating.

  • Paste the obfuscated JavaScript into the input.
  • Leave Decode \x and \u escapes on to turn hex-escaped strings back into text.
  • Leave Decode String.fromCharCode on to evaluate plain integer character-code calls.
  • Leave Pretty-print on to re-indent the result.
  • Copy the readable output, and expect to do the rest, the _0x names and string arrays, by hand.
Tips

Getting a better result out of JavaScript Deobfuscator

Specific settings and thresholds, not general advice.

  • Three passes, in this order: String.fromCharCode(72,73) calls with plain integer arguments are evaluated to their string, then \xNN and \uNNNN escapes inside string literals are decoded, then the whole thing is re-indented. Nothing else is transformed.
  • It cannot restore variable names. Minification is a one-way function: once a function's parameter is renamed to a, the original name is not in the file anywhere. Any tool that claims to recover them is guessing, usually with an LLM.
  • It does not evaluate the code. It will not unwrap eval(), decode atob() calls, resolve a string-array lookup table, or unpack a packer. Those all require running or symbolically executing the script, which is exactly what you should not do with hostile code.
  • The escape decoder is token-aware, so it only touches string literals. A \x sequence inside a regex or a comment is left alone, which is what prevents the classic naive find-and-replace from corrupting the source.
  • For heavily obfuscated code (the obfuscator.io style with _0x hex names and a shuffled string array), expect this to make the code readable, not to make it clear. Getting from readable to understood is manual work, and it should be done with the script never executed.
Limits

What JavaScript Deobfuscator does not do

The honest boundary, so you do not lose time finding it yourself.

  • No identifier renaming. Minified names cannot be recovered, by any tool.
  • No evaluation: eval, atob, Function constructors, and packer wrappers are left as-is.
  • No string-array or lookup-table resolution, which is the core of most modern JavaScript obfuscators.
  • Token-based, not a full AST parser, so it does not perform constant folding, dead-code removal, or control-flow unflattening.
At a glance

Who JavaScript Deobfuscator is for

A quick way to understand who this helps, what it solves, and where it connects next.

Best fit

Developers making obfuscated JavaScript readable.

Ideal for

Using the javascript deobfuscator without installing anything or signing up.

FAQ

Common questions

Short answers for the questions people usually have before trying a utility like this.

Can it recover the original variable names?

No, and neither can anything else. When a minifier renames a variable to a, the original name is deleted from the file. There is nothing left to recover. Tools that appear to restore names are inferring them from context, usually with a language model, and the result is a plausible guess rather than the truth. If the file shipped with a source map, that is the only real answer.

Will it unwrap eval or atob?

No, deliberately. Unwrapping those means either executing the code or symbolically evaluating it, and executing an unknown obfuscated script is precisely the thing you must not do while investigating it. This tool is a text transform: it decodes escapes, evaluates plain String.fromCharCode calls, and re-indents.

What does it do about the _0x names and the string array?

Nothing. The obfuscator.io pattern hides every string in a shuffled array and replaces each use with an index lookup, often through a rotation function. Reversing it means evaluating that rotation, which this tool does not do. You will get readable, well-indented code that still refers to _0x1a2b[0x3] everywhere.

Is obfuscated JavaScript a security measure?

No. Anything shipped to a browser can be read by whoever receives it, and obfuscation only raises the time cost. It is a deterrent and a licence-enforcement nuisance, not protection. Never put a secret, a key, or a security check that matters into client-side JavaScript, obfuscated or not.

Is it safe to paste malicious code in here?

Yes, in the sense that the code is never executed. It is tokenised and rewritten as text, in your browser, and never sent to a server. That is exactly why a deobfuscator should not evaluate anything: the moment a tool evaluates a hostile script to unwrap it, the tool has run the malware.

What is the difference between minified and obfuscated?

Minification shortens code to make it smaller: names get shorter, whitespace goes, and the transform is semantically neutral. Obfuscation actively works to make code hard to read: string arrays, control-flow flattening, dead code, and encoded literals. Pretty-printing fully reverses the readability cost of minification; it barely dents obfuscation.

Recommendations

You Might Also Like

Nearby tools from the catalog that fit the same job or workflow.

Cleanor app

Do it all on your device

Cleanor puts these tools in one app: compress and convert images, video, and audio, work with PDFs, and scan text right on your device. Plus free up storage and clear inbox clutter with Email Cleaner. Start with a free trial.

  • iPhone
  • Android
  • Macsoon
  • Windowssoon