Menu
Decode • Recover • Read

JavaScript De-Hider

Decode hidden JavaScript back to readable source. Auto-detects Base64, CharCodes, eval(atob()), and Hex encoding. Works with CodeMystify-style output and similar tools. Paste the hidden code, click De-Hide.

Auto-Detect Base64 / CharCodes eval / Hex Fully Static
JS De-Hider Studio Auto-Detect
Ready
How this works: The tool scans your input for known hiding patterns — document.write(atob(...)), String.fromCharCode(...), eval(atob(...)), and hex-escaped strings. It does not execute any code. It just decodes and shows you the original source.
For analysis only: Use this tool to recover code you own, to inspect code you have permission to analyze, or for security research. Do not use it to violate licenses, terms of service, or intellectual property rights.
Hidden JavaScript Input 0 chars
Decoded JavaScript 0 chars
Detected Method
—
How JavaScript De-Hiding Works

What This Tool Does

JavaScript "hiders" (like CodeMystify) take readable source code and encode it in a way that still runs but looks unreadable. The most common patterns are:

MethodLooks LikeDecodable?
Base64 + document.write<script>document.write(atob("..."))</script>✅ Yes
CharCodes + document.write<script>var x=[72,101,...];x.forEach(...)</script>✅ Yes
eval + atobeval(atob("..."))✅ Yes
Hex escape string"\x48\x65\x6c\x6c\x6f"✅ Yes
Custom encryptionUnknown algorithm, custom key❌ No

This tool auto-detects the first four patterns, extracts the payload, decodes it, and shows you the original readable JavaScript. All decoding happens in your browser — no execution, no uploads.

Example: Decoding Base64 document.write

Input (hidden):

<script>document.write(atob("Y29uc29sZS5sb2coJ0hlbGxvLCBXb3JsZCEnKTs="));</script>

Output (decoded):

console.log('Hello, World!');

Example: Decoding CharCodes document.write

Input (hidden):

<script>var y="";var x=[99,111,110,115,111,108,101,46,108,111,103,40,39,72,105,39,41];x.forEach(char=>{y+=String.fromCharCode(char)});document.write(y);</script>

Output (decoded):

console.log('Hi')

How Detection Works

  1. Scan for atob("...") — extracts the Base64 string and decodes it.
  2. Scan for String.fromCharCode with a numeric array — extracts the array and converts each number back to a character.
  3. Scan for eval(atob(...)) — extracts the Base64 inside eval and decodes it.
  4. Scan for hex escape sequences — converts \xNN sequences back to characters.
  5. Strip wrapping — removes <script>, document.write, and any surrounding wrappers so you see the clean JS.

If the input does not match any known pattern, the tool reports it and does not fake output.

What This Tool Can Decode

  • CodeMystify output — both js64 and jsc modes
  • Custom Base64 wrappers — any atob("...") pattern
  • CharCode arrays — any fromCharCode([...]) pattern
  • eval + atob — common in older obfuscators
  • Hex-escaped strings — "\x48\x65..." format

What This Tool Cannot Decode

  • Custom encryption — if the payload is XOR-encrypted with a hidden key or uses a custom algorithm, this tool cannot recover it.
  • Code that depends on runtime state — if the hidden code generates its payload dynamically from server data or user input.
  • Full obfuscation — tools like javascript-obfuscator rename variables, flatten control flow, and inject dead code. This tool does not "deobfuscate" those — use a dedicated JS deobfuscator for that.
  • Minified code — this tool decodes encoding, it does not beautify or reformat minified source.

When to Use This Tool

  • Recover your own code. If you hid a script months ago and lost the original, this tool can recover it.
  • Understand a widget. When you embed a third-party widget and want to know what it does.
  • Security research. Analyzing suspicious scripts found on a site you are investigating.
  • Learning. Seeing how common JS hiding techniques work under the hood.
  • Debugging. When a hidden script misbehaves and you need to read the original source.

Ethical Use

Use this tool responsibly. De-hiding someone else's code to copy it, remove copyright notices, or reuse it without permission may violate copyright law, software licenses, or terms of service. Only de-hide code that you own or have explicit permission to analyze.

Frequently Asked Questions

Does this tool execute JavaScript?
No. It performs static string decoding only. The decoded output is shown as text — it is never run.
Does my code get uploaded anywhere?
No. Everything runs in your browser. Your code never leaves your device.
What patterns does it detect?
Four: Base64 + document.write (CodeMystify js64 mode), CharCodes + document.write (CodeMystify jsc mode), eval + atob, and hex escape sequences.
Can it decode custom encryption?
No. If the payload is XOR-encrypted with a hidden key or uses a custom algorithm, the tool will report that it cannot decode it.
What about javascript-obfuscator output?
That is different. javascript-obfuscator does not encode the whole code as Base64 — it renames variables, encodes strings, and restructures logic. This tool does not deobfuscate that. Use a dedicated JS deobfuscator for such cases.
Does it work with CodeMystify output?
Yes — both js64 (Base64) and jsc (CharCodes) modes are fully supported.
Can I use this to recover my own lost code?
Yes — that is one of the most common uses. If you hid a script and lost the original, paste the hidden version here to recover it.
Is de-hiding legal?
De-hiding code you own is fine. De-hiding someone else's code may violate copyright, licenses, or terms of service. Only use it on code you own or have permission to analyze.
Does it beautify or reformat the output?
No. It shows the decoded source exactly as it was before hiding. If the original was minified, the output will be minified.
Can it decode multiple layers?
No. It decodes one layer at a time. If the decoded output is still hidden with another pattern, paste it back in and decode again.

Related Tools

External Resources