Skip to main content

Php Obfuscator Online -

// Step 4: Numeric literal obfuscation: 42 -> (0x2A) or (24+18) etc if (optNumObf.checked) // Replace integer numbers (not inside strings or already obfuscated) obfuscated = obfuscated.replace(/\b(\d+)\b/g, (match, num) => n === 1) return match; // keep trivial // random obfuscation style: hex, or arithmetic const style = Math.floor(Math.random() * 3); if (style === 0) return `0x$n.toString(16)`; if (style === 1) let a = Math.floor(Math.random() * n) + 1; let b = n - a; if (b < 0) b = 0; return `($a+$b)`; if (style === 2) return `~(~$n)`; // double invert return match; );

@media (max-width: 780px) .container padding: 1rem; .panel padding: 1rem; button padding: 0.5rem 1rem; </style> </head> <body> <div class="container"> <h1>🔐 PHP Obfuscator <span style="font-size:1.8rem;">⚡</span></h1> <div class="sub">Protect your PHP scripts — Rename variables, encode strings, scramble logic (executable output)</div>

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

<div class="two-columns"> <!-- INPUT PANEL --> <div class="panel"> <div class="panel-header"> <h2>📄 Original PHP Code</h2> <span class="badge">paste your script</span> </div> <textarea id="inputCode" rows="14" placeholder="<?php // Example PHP code $message = 'Hello World'; function greet($name) return 'Welcome ' . $name; echo greet($message); ?>"></textarea> <div class="stats"> <span id="inputStats">Lines: 0 | Size: 0 B</span> <span>✨ Obfuscation level: Medium/High</span> </div> </div>

input[type="checkbox"] width: 16px; height: 16px; accent-color: #3b82f6; // Step 4: Numeric literal obfuscation: 42 -&gt;

// store mapping for variables and functions let varMap = new Map(); let funcMap = new Map();

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

obfuscateBtn.addEventListener('click', runObfuscator); // initial stats update updateStats(inputTextarea, inputStatsSpan); updateStats(outputTextarea, outputStatsSpan); // demo default example (set a meaningful example) const example = `<?php // Simple calculator function add($a, $b) return $a + $b;