Skip to main content

CometWeb tools

JavaScript code obfuscator online — obfuscate JS locally

JavaScript code obfuscation online · your code stays local in the browser

FreeNo account required
Warning

Obfuscation can discourage casual copying and increase reverse-engineering effort. The result is still client-side code that a user can inspect; it does not protect secrets, replace server-side authorization or fix security vulnerabilities.

Techniques

These transforms are text heuristics, not a JavaScript parser: console calls inside an expression become void 0 instead of disappearing, and quotes in comments or regex literals can still be misread. The output may parse and still behave differently from the original — test it before you ship it.

Before you download: do not put API keys, passwords or tokens in client code. Authorization and secrets belong on the backend — obfuscation does not protect them.

Need a smaller code payload? Add reading friction, then remove unnecessary bytes.
Open the code minifier

A JavaScript code obfuscator online changes selected client-side patterns locally to make quick reading harder. It is not encryption and does not protect secrets, API keys or server authorization.

Why obfuscation is not encryption

Obfuscation buys time, not secrecy. It slows down a casual read in DevTools, but a determined reader will recover the logic — deobfuscators are public and free.

Sensible uses: business-logic friction (pricing, coupons), scraping friction. API keys still belong on the server.

Bad uses: hiding malware, dodging ad blockers, or hiding trackers from users.

Test behavior after transformation

Keep the original file and run tests on the output. Check error handling, console messages and calls from other scripts. Successfully generating code does not prove that the application behaves as before.

Obfuscation techniques

MMangling
Rename variables and functions to opaque ids (e.g. _0x4a2f). Simplest technique.
SString encoding
Strings as \x6a\x61\x6e (hex) or Base64 so literals are less obvious.
DDead code injection
Inject never-run code to grow size and muddy control flow.
CFControl flow flattening
Turn if/while into switch + state table. Can slow execution.
This tool patches one problem at a time

TLS, headers, cookies and exposure — with a score breakdown and a remediation plan.