Skip to content

Decode data from a base64 string

POST
/base64/decode/{engine}

Parameters

Path Parameters

engine*

Base64 engines for encoding and decoding

bcrypt binhex crypt imap-mutf7 are not using padding

The custom engine allows you to specify your own alphabet and padding

Typestring
Required
Enumstandard, standard_no_pad, url_safe, url_safe_no_pad, bcrypt, bin_hex, crypt, imap_mutf7, custom

Query Parameters

alphabet

The alphabet to use for decoding

Typestring
pad

Whether to use padding

Typeboolean

Responses

The encoded or decoded data
string
Formatbinary

Samples

cURL
curl -X POST https://httpbin.rs/base64/decode/{engine}
JavaScript
fetch("https://httpbin.rs/base64/decode/{engine}", { method: "POST" })
  .then(response => response.json())
  .then(data => console.log(data));
PHP
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, "https://httpbin.rs/base64/decode/{engine}");
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, "POST");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
$response = curl_exec($ch);
curl_close($ch);
echo $response;
Python
import requests
response = requests.post("https://httpbin.rs/base64/decode/{engine}")
print(response.json())
Powered by VitePress OpenAPI