JavaScript String Decoder
Decode escaped JavaScript strings and Base64 literals right in your browser — no uploads.
Input
Decoded Output
What Is the JavaScript String Decoder?
Spotted a JavaScript file where string values look like "Hello" or "World"? This decoder converts those escaped and encoded strings back to readable text — directly inside JavaScript source. Paste obfuscated or minified code; get readable output for debugging and analysis. The ECMAScript specification defines how string escapes work. For broader context, see MDN String docs and Babel for understanding JS transforms.
This tool runs entirely in your browser. Nothing is sent to a server. For obfuscating code, use JavaScript Obfuscator. For formatting only, use JavaScript Formatter. For validation, use JavaScript Validator.
How to Decode JavaScript Strings
Paste or Upload
Paste JavaScript with escaped strings (hex, unicode, or Base64-like literals) and review the decoded output instantly.
View Decoded Output
The tool decodes \xNN and \uNNNN escapes, attempts safe Base64 literal decoding, and formats the result for readability.
Copy or Download
Use Copy or Download to get the result. For running code, use JavaScript Console.
JavaScript String Decoder Example
Here is an example of decoding escaped JavaScript strings.
Example: Escaped and Base64-like literals
Encoded input:
Decoded output:
When the JavaScript String Decoder Helps
Use this tool when code hides payloads in escaped literals. It is especially useful for quickly revealing messages, URLs, or script fragments embedded as encoded strings.
Frequently Asked Questions
Is my data private?
Yes. Decoding runs entirely in your browser. No data is sent to any server — safe for reviewing sensitive or proprietary scripts.
What encodings are supported?
Hex (\xNN), unicode (\uNNNN), and many plain Base64 literals. Complex runtime decoders may still need manual review.
Can it fully reverse obfuscation?
It handles simple string-level encoding. Heavy obfuscation with eval() chains or dynamic code generation may still need the Deobfuscator.
String Decoder vs Deobfuscator — what's the difference?
String Decoder focuses on literal decoding (hex, unicode, Base64). Deobfuscator targets broader code cleanup including control flow and eval() unwrapping.
Is it legal to decode or deobfuscate someone else's JavaScript?
Decoding is fine for debugging your own code or security research. For third-party code, check the license and terms of service first.
Related Tools
ECMAScript spec. MDN String docs. Terser. Chrome DevTools. Babel.