PHP Source Encoder / Obfuscator
Obfuscate PHP by stripping comments and renaming identifiers, or encrypt it with real AES-256-GCM - all client-side.
Compact and lightly obfuscate JavaScript entirely in your browser - no code ever leaves your machine.
It uses the standard heuristic real minifiers use: a "/" starts a regex when the previous token is the start of input, an operator, an opening bracket, a comma/semicolon/colon/exclamation mark, "&&"/"||", a question mark, or a keyword like return/typeof/new/case/yield. Otherwise it's treated as division. This covers the overwhelming majority of real code correctly but is a heuristic, not a full parser - a contrived snippet can theoretically fool it (for example unusual keyword sequences the heuristic doesn't recognise as regex-preceding), so always verify obfuscated output runs before deploying it.
Template literals can contain arbitrary interpolated expressions (`${...}`), including nested template literals, so safely rewriting only their literal text without touching the interpolation is significantly harder than handling a plain quoted string. This tool deliberately only extracts plain single- and double-quoted string literals and leaves template literals exactly as written - a known, intentional scope limit rather than an oversight.
No - it's a whole-file heuristic, not real lexical-scope analysis. It only renames a name if it found an actual var/let/const/function/parameter declaration for it in the file, and it permanently excludes any name that also ever appears in property-access position (after a dot, or after "this.") or as an object key/label (before a colon), since a token stream alone can't prove those are the same identifier. The deliberate failure mode is under-renaming: some legitimate local names are left alone (always safe, just less thorough) - the tool is built to never incorrectly rename something, even at the cost of renaming less than a true scope-aware obfuscator would.
No, and this is deliberate - the control is named accordingly. True control-flow flattening restructures a function's statements into a dispatcher/state-machine loop, which needs real control- and data-flow analysis to do without breaking early returns, breaks, or continues that cross block boundaries. This tool instead wraps some top-level statement groups (skipping any that declare a block-scoped let/const/class/function, since nesting those in a new block would change their scope) in an `if` whose condition is an always-true arithmetic identity built from concrete numbers. It's a modest, genuinely zero-risk obfuscation, not flattening - if you need real control-flow flattening, this tool does not provide it.
Obfuscate PHP by stripping comments and renaming identifiers, or encrypt it with real AES-256-GCM - all client-side.
Format or conservatively minify HTML, CSS, JavaScript, JSON, XML, SQL and PHP, one tool for all seven.
Convert text and binary data to Base64 and back.
Your input is saved in this browser so a refresh does not lose it. Tools handling credentials are never saved.