estrogen

estrogen

loading engine...
@sysce/estrogen

Want to protect your site from crawlers? estrogen transforms your built JavaScript into something more fun. Drop in a file or a whole codebase and it rewrites the strings and shortens the names, right in your browser. Nothing you load leaves your machine, and it comes back ready to ship. This page is a web UI in the spirit of javascript-obfuscator and obfuscator.io, running the real estrogen engine compiled to WebAssembly.

Pick a folder, or drop files here estrogen runs on every .js, .mjs and .cjs file in the folder. Every other file is copied through unchanged. You get the whole tree back as a .zip. Nothing leaves your browser.

FAQ

Why would I obfuscate my JavaScript?

To make a shipped build more fun to read, for crawlers, scrapers and the casual copy/paste. estrogen takes the plain string and template literals out of the source and stores them in an encrypted pool, so a reader can no longer grep for a message, a URL or a key name and land on the line that uses it.

Is this foolproof?

No. The browser has to run the code, so a reader with time and patience can work it back. estrogen makes that a lot more work, which is the point.

Why is the output larger than my source?

Because the pass prepends a decoder and stores the literals as an encrypted, base64 pool, which is bigger than the plain text it replaced. There is a lot of repetition in the decoder, so the output compresses well with gzip or brotli, which most servers already send.

Does it work on any JavaScript?

It works on standard JavaScript and Node source that parses, including .mjs and .cjs. The browser demo runs one source string at a time through the pass, or every .js, .mjs and .cjs file when you upload a folder. If an input has no poolable string or template literal, the pass reports zero edits and the output matches the input. A file that fails to parse is copied through unchanged and noted as skipped.

Is my code uploaded anywhere?

No. There is no server. The engine is WebAssembly running in this page, so your source never leaves your browser. Reload the tab and it is gone.

Can I run it on my own machine?

Yes. estrogen is a post-build obfuscator published to npm as @sysce/estrogen. It rewrites an already-built output directory and has an Astro integration for build-time use. This page is the same engine compiled to WebAssembly.