| Server IP : 139.59.63.204 / Your IP : 216.73.217.62 Web Server : Apache/2.4.58 (Ubuntu) System : Linux ubuntu-s-1vcpu-1gb-blr1-01 6.8.0-110-generic #110-Ubuntu SMP PREEMPT_DYNAMIC Thu Mar 19 15:09:20 UTC 2026 x86_64 User : root ( 0) PHP Version : 8.3.6 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /var/www/efbtechnology.com/lab/ |
Upload File : |
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Base64 Encode/Decode</title>
<style>
body {
font-family: Arial, sans-serif;
padding: 20px;
max-width: 600px;
margin: auto;
}
textarea {
width: 100%;
height: 100px;
margin-bottom: 10px;
}
button {
padding: 10px 20px;
margin-right: 10px;
cursor: pointer;
}
</style>
</head>
<body>
<h2>Base64 Encoder / Decoder</h2>
<label for="input">Input:</label>
<textarea id="input" placeholder="Enter text or base64 string..."></textarea>
<button onclick="encode()">Encode</button>
<button onclick="decode()">Decode</button>
<label for="output">Output:</label>
<textarea id="output" readonly></textarea>
<script>
function encode() {
const input = document.getElementById("input").value;
try {
const encoded = btoa(unescape(encodeURIComponent(input)));
document.getElementById("output").value = encoded;
} catch (e) {
alert("Error encoding input. Possibly invalid characters.");
}
}
function decode() {
const input = document.getElementById("input").value;
try {
const decoded = decodeURIComponent(escape(atob(input)));
document.getElementById("output").value = decoded;
} catch (e) {
alert("Error decoding input. Make sure it's valid Base64.");
}
}
</script>
</body>
</html>