JavaScript Deobfuscator
Deobfuscate and beautify obfuscated JavaScript code
Input
Deobfuscated Output
What Is the JavaScript Deobfuscator?
The JavaScript Deobfuscator reverses common obfuscation patterns and beautifies JavaScript. Paste obfuscated or minified code; get readable output for debugging and analysis. The ECMAScript spec defines the language.
The unpacking happens in this tab, so a suspicious script you are inspecting is never uploaded anywhere. To go the other direction and scramble your own code, use JavaScript Obfuscator. For formatting only, use JavaScript Formatter. For validation, use JavaScript Validator.
How to Use This Tool
Paste or Upload
Paste obfuscated or minified JavaScript into the left panel or upload a .js or .txt file. Use Sample to load example code.
View Deobfuscated Output
Cleaned, re-indented code appears on the right. Some obfuscation may remain; advanced patterns are hard to fully reverse.
Copy or Download
Copy the cleaned-up code, or Download it as deobfuscated.js. To actually run it, use JavaScript Console.
JavaScript Deobfuscator Examples
Here is an example of deobfuscating JavaScript with mangled variable names.
Example: Obfuscated MSISDN validation
Obfuscated input:
Deobfuscated output:
When the JavaScript Deobfuscator Helps
When debugging third-party scripts, analyzing malware, or understanding obfuscated code, deobfuscation makes it readable. Great for security review and learning. Tools like Terser and UglifyJS minify; obfuscators add encoding and mangling. For minified (non-obfuscated) code, JavaScript Formatter may be enough. See Chrome DevTools for debugging.
Frequently Asked Questions
Is my data private?
Yes. The script is untangled by code running in this tab, and what you paste is not sent to any backend.
Does it work on minified code?
Yes. The formatter can make minified JavaScript easier to read. For minified-only code, JavaScript Formatter may suffice.
Can it fully reverse obfuscation?
It depends on the obfuscation. Simple patterns are reversed. Heavy obfuscation may leave some code hard to read.
Deobfuscator vs Formatter?
Formatter adds indentation. Deobfuscator also reverses encoding, renames variables, and simplifies control flow where possible.
Is it legal to deobfuscate?
Use for debugging your own code, security research, or with permission. Check licenses and terms for third-party code.