JavaScript Obfuscator

Apply or reverse six JS encoding tricks, with auto-detect on decode

Completely free

Checking your access…

The AllFreeTool JS encryption and decryption tool performs common JavaScript string obfuscation and restoration online for free, supporting six schemes — escape (%uXXXX), %uXXXX, \uXXXX, \xNN, Base64 and decimal character codes — and it can automatically add wrappers such as eval(...), document.write(...) and <script>, with optional line breaks every 40, 80 or 120 characters.

Reverse decryption supports the same six schemes, and when you are unsure which format was used you can turn on auto-detect so the tool judges by signature and restores the original code. Every transform is pure string arithmetic: the tool only encodes and decodes, never executes the code you paste, and never uploads your content to the server.

Why use JavaScript Obfuscator on AllFreeTool?

🔀

Six Encoding Schemes

escape, %uXXXX, \uXXXX, \xNN, Base64 and character codes, all mutually reversible.

🧩

Wrapper Shells

Optionally wrap with eval, document.write or <script>, with chunked line wrapping.

🔎

Auto-Detect Decryption

Paste an encoded result and the encoding scheme is detected automatically, restoring readable source in one click.

🔒

Never Executed Locally

Only string transformation is performed; no code is run and your source is never uploaded.

How to use JavaScript Obfuscator

1

Choose a direction

Encrypt mode turns your source into an encoded string; decrypt mode restores an encoded string back to source.

2

Pick a scheme and options

Select the encoding scheme, enable wrapper, compression or line breaks as needed; decryption can enable auto-detect.

3

Copy or download

Copy the result, or download it as a .js file and drop it straight into your project.

Common questions

Can this kind of encryption protect source code?+

It only provides obfuscation and discourages casual copying; every encoding scheme can be reversed, so it cannot truly protect copyright or hide secrets. Keep genuinely confidential data on the server and out of front-end code.

Will the tool execute the code I paste?+

No. Decoding only parses and replaces strings, never calling eval or any other execution function, so the code you paste never runs on the page and is only turned into readable text.

Why do Chinese characters and emoji also restore correctly?+

Encoding works on Unicode code points, and Base64 uses the UTF-8 byte stream, so Chinese characters, emoji and rare glyphs all round-trip completely without loss, which is why no characters are ever mangled.

What should I do when auto-detect fails?+

A string that is pure ASCII with no %u, \u or %XX signature offers no recognizable marker; in that case, choose the matching encoding scheme manually so the string is still decoded correctly.

More Crypto tools