Chargement...

Php Obfuscator Online Apr 2026

button.warning:hover background: #9a3412;

<div class="options"> <span style="font-size:0.8rem;">⚙️ Obfuscation tactics:</span> <div class="option-group"> <label><input type="checkbox" id="optVarRename" checked> 🔀 Rename variables</label> <label><input type="checkbox" id="optFuncRename" checked> 🏷️ Rename functions (user-defined)</label> <label><input type="checkbox" id="optStringEncode" checked> 🔣 Encode strings (base64 + eval)</label> <label><input type="checkbox" id="optStripSpace" checked> ✂️ Strip spaces & comments</label> <label><input type="checkbox" id="optNumObf" checked> 🔢 Numeric literal obfuscation</label> </div> </div> <div id="errorMsg" class="error" style="display: none;"></div> <footer> ⚠️ Note: Obfuscation makes code harder to read but NOT 100% unbreakable. Always backup original. Works with most PHP 7+ scripts. </footer> </div>

function showError(msg) errorDiv.innerText = msg; errorDiv.style.display = 'block'; setTimeout(() => if (errorDiv) errorDiv.style.display = 'none'; , 4000); php obfuscator online

function obfuscatePHP(code) { // 0) if no code if (!code.trim()) return "// No PHP code provided";

button i font-style: normal; font-weight: bold; button

button.secondary:hover background: #3b4a70;

// MAIN OBFUSCATE ACTION async function runObfuscator() errorDiv.style.display = 'none'; let rawCode = inputTextarea.value; if (!rawCode.trim()) showError('Please enter PHP code to obfuscate.'); return; try result.length < 3) throw new Error('Obfuscation produced empty output'); outputTextarea.value = result; updateStats(outputTextarea, outputStatsSpan); updateStats(inputTextarea, inputStatsSpan); catch (err) console.error(err); showError('Obfuscation error: ' + err.message); outputTextarea.value = '// Error during obfuscation, check original syntax.\n' + rawCode; // Use function that encodes string content

// Step 3: Encode strings (base64 + eval / base64_decode) if (optStringEncode.checked) // Find double quoted and single quoted strings (excluding heredoc for simplicity) // Replace string literals with: base64_decode('...') but careful to avoid overlapping and small strings // We will process string tokens that are not inside existing encoded. // Replace both "..." and '...' , but skip strings with interpolation for double quotes? safer to handle single quote and simple double quote. // Use function that encodes string content. function encodeString(match, quote, content) if (content.length < 2) return match; // very short strings keep as is // avoid re-encoding already encoded patterns (contains base64_decode) if (content.includes('base64_decode') // handle single quotes: 'text' const singleQuoteRegex = /'([^'\\]*(?:\\.[^'\\]*)*)'/g; obfuscated = obfuscated.replace(singleQuoteRegex, (match, content) => if (content.includes('base64_decode')) return match; if (content.length < 3) return match; const encoded = btoa(unescape(encodeURIComponent(content))); return `base64_decode('$encoded')`; ); // handle double quotes (do not handle complex interpolation, but simple) const doubleQuoteRegex = /"([^"\\]*(?:\\.[^"\\]*)*)"/g; obfuscated = obfuscated.replace(doubleQuoteRegex, (match, content) => if (content.includes('base64_decode')) return match; if (content.length < 2) return match; const encoded = btoa(unescape(encodeURIComponent(content))); return `base64_decode('$encoded')`; ); // ensure we have base64_decode function available: add helper at top if not exists if (!obfuscated.includes('function base64_decode')) // we prepend a small note but don't break; base64_decode is builtin PHP function. no need to define

.badge background: #1e293b; border-radius: 40px; padding: 0.2rem 0.7rem; font-size: 0.7rem; font-weight: 500; color: #a5f3fc;