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:
| Method | Looks Like | Decodable? |
|---|---|---|
| Base64 + document.write | <script>document.write(atob("..."))</script> | ✅ Yes |
| CharCodes + document.write | <script>var x=[72,101,...];x.forEach(...)</script> | ✅ Yes |
| eval + atob | eval(atob("...")) | ✅ Yes |
| Hex escape string | "\x48\x65\x6c\x6c\x6f" | ✅ Yes |
| Custom encryption | Unknown 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
- Scan for
atob("...")— extracts the Base64 string and decodes it. - Scan for
String.fromCharCodewith a numeric array — extracts the array and converts each number back to a character. - Scan for
eval(atob(...))— extracts the Base64 inside eval and decodes it. - Scan for hex escape sequences — converts
\xNNsequences back to characters. - 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
js64andjscmodes - 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-obfuscatorrename 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
JS Code HiderHide JavaScript
JavaScript ObfuscatorStronger protection
Base64 ObfuscatorEncode / decode
Python DeobfuscatorDecode Python