Tiny Online Tools logoTiny Online ToolssearchSearch tools…grid_viewAll Tools
Homechevron_rightReverse Engineering Toolschevron_rightJavaScript Deobfuscation HelperJavaScript Deobfuscation Helper

JavaScript Deobfuscation Helper

Reverse common static JavaScript obfuscation: inline string-array lookups, decode escapes, fold constants, drop dead branches, and turn brackets into dots.

infoThis reverses common STATIC obfuscation patterns only — string-array lookups, escaped literals, literal arithmetic, always-true/false branches, and bracket access. It does not run any code, so it cannot unpack eval-based loaders, solve runtime-dependent conditions, or reverse control-flow flattening beyond a trivially literal test. Variable names are left untouched.Obfuscated JavaScript

Similar Tools

JavaScript Obfuscator

JavaScript Obfuscator

Rename local variables, hide string literals and flatten control flow in JavaScript — entirely in your browser, nothing uploaded.

JavaScript Dead Code Analyzer

JavaScript Dead Code Analyzer

Paste a JS bundle and find top-level functions with no static reference anywhere in the file — a heuristic reachability scan, not a certainty.

PDF JavaScript Inspector

PDF JavaScript Inspector

Find every script inside a PDF — document actions, page and annotation events, and form-field calculations — and read it without running it.

JavaScript Formatter

JavaScript Formatter

Format JavaScript code for readability.

Resize Image

Resize Image

Resize images to custom dimensions while maintaining quality.

GIF Frame Extractor

GIF Frame Extractor

Extract every frame of an animated GIF as a separate PNG image in your browser. Per-frame download, no upload, fully private.

Compress PDF

Compress PDF

Reduce the file size of a PDF document without uploading it.

apps

More Tools

Browse our full collection of free online tools.

What this tool undoes

Many JavaScript obfuscators — including the browser-based one on this site — rewrite code through a small set of mechanical, purely static transforms: they move every string literal into one array and replace each use with a call to a getter function, they escape ordinary characters as \xNN or \uNNNN sequences, they expand simple arithmetic into equivalent-but-longer expressions, they wrap real code in an always-true or always-false if, and they rewrite a.b as a['b']. This tool reverses exactly those five things:

  1. String-array inlining — finds var _s = ["foo", "bar"]; function _g(i){ return _s[i]; } and replaces every _g(0)-style call whose index is a literal number with the actual string, then removes the array and function if nothing else uses them.
  2. Escape decoding — shows \x48\x69 as Hi instead of the escaped form.
  3. Constant folding — turns 1 + 2 into 3, "a" + "b" into "ab", and similar literal arithmetic, skipping anything that would require guessing (like division by a literal zero).
  4. Dead-branch removalif (true) { A } else { B } becomes just A; a while (false) {} disappears entirely.
  5. Bracket-to-dotobj['name'] becomes obj.name when name is a valid identifier.

What it will not do

This is static pattern-matching over an AST, not a general deobfuscator. It does not execute any code, so it cannot unpack an eval-based loader, solve an opaque predicate that depends on a runtime value, or reverse control-flow flattening beyond the single always-literal if/while/ternary case above. Variable names are left exactly as they are — _0x1a2b stays _0x1a2b. If your file doesn't match the string-array + getter-function shape exactly, that stage simply reports zero inlined calls rather than guessing at a different pattern.

How it works

The code is parsed into an AST with acorn, walked and rewritten with hand-written transforms that only ever act when a value is already provably a literal, and regenerated with astring. Nothing is uploaded — parsing and rewriting both happen in your browser.

Using it

Paste or type JavaScript into the editor and run it. The summary shows exactly how many times each stage fired, so you can see what changed and what didn't. Copy the result or download it as a .js file.