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.
Hex and Unicode escape sequences are decoded right here on the page, and the script you paste never goes to a server. To scramble code rather than read it, 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
Copy the decoded script to your clipboard, or Download it to keep alongside the original. 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. The decoding is done by script inside this tab and nothing is transmitted, so it is fine to inspect proprietary or sensitive code with it.
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.