webdev_js_obfuscator
Obfuscate JavaScript code to deter casual reading and reverse engineering using variable name mangling, string Base64 encoding, and optional control-flow flattening.
Instructions
JavaScript Code Obfuscator. Obfuscate a JavaScript snippet to deter casual reading and reverse engineering, applying variable/function name mangling, string Base64-encoding, optional control-flow flattening, dead-code injection, and whitespace compaction. Use this to harden client-side JS; use webdev_js_minifier instead when you only want a smaller file (no name mangling or string hiding), or webdev_javascript_beautifier to reverse compaction and re-indent. Regex-based transform, not a full parser, so output is NOT guaranteed runnable and is not reversible/decryptable — keep the original source. Runs locally via a Node bridge: read-only, non-destructive, contacts no external service, rate-limited (30 req/min anon). Returns the obfuscated code plus before/after size and line statistics.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| code | Yes | JavaScript source to obfuscate (alias: input). Must be non-empty after trimming or the call returns HTTP 400. | |
| strength | No | Preset intensity. light skips control-flow flattening; medium adds it; heavy also enables dead-code injection. Unknown values fall back to medium. Individual options override the preset defaults. | medium |
| options | No | Per-technique toggles overriding the strength preset. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| input | No | The original JavaScript exactly as submitted. | |
| output | No | The obfuscated JavaScript. | |
| strength | No | The effective strength preset applied. | |
| options | No | The fully-resolved boolean toggles actually applied (defaults merged with overrides). | |
| statistics | No | Before/after metrics. |