Base64 Decode API - Convert Base64 to Plain Text
Convert a Base64-encoded string back into readable UTF-8 text. Supports both standard and URL-safe Base64 variants. Returns clear error messages if the input is not valid Base64.
Code examples
curl -X POST https://api.botoi.com/v1/base64/decode \
-H "Content-Type: application/json" \
-d '{"encoded":"SGVsbG8sIFdvcmxkIQ==","urlSafe":false}'When to use this API
Read Base64-encoded webhook payloads
Many services (Stripe, Twilio, GitHub) deliver event data as Base64. Decode the payload to inspect the original JSON or XML body.
Extract embedded content from emails
MIME email attachments are Base64-encoded. Decode them server-side to retrieve the original file or text.
Frequently asked questions
What happens if the input is not valid Base64?
The API returns an error response with a descriptive message explaining where the input deviates from the Base64 spec.
Can I decode Base64-encoded binary data like images?
This endpoint returns the decoded content as a UTF-8 string. For binary data, you would need to handle the raw bytes on the client side after decoding.
Does this handle padding characters (=)?
Yes. Both padded and unpadded Base64 inputs are accepted.
How do I know if the input is URL-safe or standard Base64?
If the string contains - or _ characters, it is URL-safe Base64. If it contains + or / characters, it is standard Base64.
Get your API key
Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.