Base64 Decode
Decode standard or URL-safe Base64 strings back to plaintext.
/v1/auth/base64-decode
curl -X POST "https://auth.toolkitapi.io/v1/auth/base64-decode" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"input": "SGVsbG8sIFdvcmxkIQ==",
"url_safe": false
}'
import httpx
resp = httpx.post(
"https://auth.toolkitapi.io/v1/auth/base64-decode",
json={
"input": "SGVsbG8sIFdvcmxkIQ==",
"url_safe": false
},
)
print(resp.json())
const resp = await fetch("https://auth.toolkitapi.io/v1/auth/base64-decode", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
"input": "SGVsbG8sIFdvcmxkIQ==",
"url_safe": false
}),
});
const data = await resp.json();
console.log(data);
# See curl example
{
"decoded": "Hello, World!",
"encoding": "base64"
}
Try It Live
Description
How to Use
1. Set the `input` field to the Base64-encoded string you want to decode.
2. Set `url_safe` to `true` if the string uses URL-safe Base64 encoding (with `-` and `_` instead of `+` and `/`).
3. Send a POST request and read the `decoded` value from the response.
About This Tool
The Base64 Decode endpoint converts a Base64-encoded string back to its original plaintext representation. It supports both standard Base64 and URL-safe Base64 decoding.
This is the companion to the Base64 Encode endpoint. Use it to decode data received from APIs, email headers, JWT segments, data URIs, or any other Base64-encoded source.
If the input is not valid Base64, the endpoint returns a 400 error with a descriptive message to help you identify the issue.
Why Use This Tool
- Decoding API responses — Decode Base64-encoded fields from third-party APIs
- Reading JWT segments — Decode JWT header and payload sections for inspection
- Processing email content — Decode MIME-encoded email bodies or attachments
- Extracting data URIs — Decode inline data URI content
- Debug and inspection — Quickly decode Base64 strings during development
Frequently Asked Questions
What if my Base64 string has no padding?
Can I decode binary data?
How do I know if my string is URL-safe Base64?
Start using Base64 Decode now
Get your free API key and make your first request in under a minute.