b2KIT

JavaScript Deobfuscator

Deobfuscate packed and obfuscated JavaScript code. Detect eval-based packers, hex encoding, and string rotation.

Tested tool guide Tested browser tools Checked August 16, 2026

What JavaScript Deobfuscator does and how it behaves

Obfuscated JavaScript often hides meaningful strings behind packed eval calls, hexadecimal escapes, or shuffled lookup tables. This tool examines pasted source for those specific patterns and produces a more readable form when it recognizes them. It is intended for inspecting code, not proving what the code will do in every browser state. The point most often missed is that deobfuscated code is not necessarily the original code: lost comments and meaningful identifier names cannot be reconstructed, and a cleaner result is not evidence that the script is safe.

How the result is produced

1

Recognized transformations

The first pass identifies known eval-based packing wrappers, hexadecimal escapes in JavaScript string literals, and string-table rotation patterns. For a recognized wrapper, the useful result is the source that the wrapper conceals; for an escaped literal, it is the equivalent readable characters; for a rotated table, it is the corrected association between indexes and strings. Ordinary program logic outside those patterns is retained for inspection.

2

Layered obfuscation

Obfuscation techniques can be nested: a packer can reveal code that still contains escaped strings or rotated indexes. Read the result as another JavaScript listing and check it for dynamic constructors, computed member names, concatenated fragments, and remaining lookup arrays. Values that depend on DOM contents, storage, time, randomness, user input, or a response received later cannot be recovered from source text alone.

Good uses

  • Inspect an eval-packed script copied from a compromised page before deciding which functions and URLs deserve deeper review.
  • Convert hexadecimal-escaped JavaScript strings into readable text so incident responders can search for hostnames, DOM selectors, storage keys, or command fragments.
  • Resolve the index-to-string mapping in a rotated lookup table found in an obfuscated browser extension, bookmarklet, tag, or injected script.

Limits and checks

  • A readable result is not a safety verdict. Calls that fetch code, construct functions, alter the DOM, read storage, or redirect the page can remain harmful after obfuscation is removed.
  • The tool can only expose patterns present in the pasted JavaScript. A value assembled from runtime inputs, remote responses, browser APIs, or environment checks may remain unknown or appear only as an expression.
  • Original comments, whitespace, source maps, and developer-chosen names are not encoded in most obfuscated output, so they cannot be recovered merely by unpacking strings. Similar-looking generated names may have no semantic meaning.

Common questions

Is every eval call evidence of a JavaScript packer?

No. eval is a JavaScript language feature that evaluates a string as code, and non-obfuscated programs can use it. This tool's eval-based packer detection is a clue about structure, not proof of malicious intent. Inspect the recovered string, its inputs, and the surrounding call path before deciding why eval is present.

Can I use it on a sensitive or suspicious sample?

The pasted source is processed in the browser and is not uploaded, so server-side disclosure is not part of this tool's use. Still treat the sample and transformed output as untrusted JavaScript. Do not execute either in a page console, and avoid copying secrets unrelated to the analysis. Local processing is a privacy boundary, not a safety verdict.

References and verification

The behavioral notes were checked against the browser implementation. Standards and primary references below define the relevant format, formula, or platform behavior.

Related Tools