Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

<?php function base64url_decode($data) { return base64_decode(str_pad(strtr($data, '..

Decoded Output download

<?php 
function base64url_decode($data) { 
    return base64_decode(str_pad(strtr($data, '-_', '+/'), strlen($data) % 4, '=', STR_PAD_RIGHT)); 
} 
 
// The URL-encoded string you want to decode 
$encodedString = "czNwM2hyCg%3D%3D=dUMdSkFVVBsWFAoJBwxQQRwL"; 
 
// Decode the URL-encoded string 
$decodedString = base64url_decode(urldecode($encodedString)); 
 
// Display the decoded string 
echo $decodedString; 
?>

Did this file decode correctly?

Original Code

<?php
function base64url_decode($data) {
    return base64_decode(str_pad(strtr($data, '-_', '+/'), strlen($data) % 4, '=', STR_PAD_RIGHT));
}

// The URL-encoded string you want to decode
$encodedString = "czNwM2hyCg%3D%3D=dUMdSkFVVBsWFAoJBwxQQRwL";

// Decode the URL-encoded string
$decodedString = base64url_decode(urldecode($encodedString));

// Display the decoded string
echo $decodedString;
?>

Function Calls

strtr 1
strlen 1
urldecode 1
base64url_decode 1

Variables

$data czNwM2hyCg===dUMdSkFVVBsWFAoJBwxQQRwL
$encodedString czNwM2hyCg%3D%3D=dUMdSkFVVBsWFAoJBwxQQRwL

Stats

MD5 4a187c888ad514dae5705d749a6ff642
Eval Count 0
Decode Time 38 ms