Yo! Base64 Decode logoYo! Base64 Decode
HomeAPI

Base64 Decode API

A free REST endpoint that decodes Base64 to text. Send a POST with a JSON body, get the decoded result back as plain text. No API key, no sign-up.

Endpoint

HTTP
POST https://yobase64decode.com/api/decode
Content-Type: application/json

No API key or authentication is required. The endpoint accepts standard Base64 (RFC 4648 §4); URL-safe Base64 (the -_ alphabet) is not accepted. CORS is open, so you can call it from the browser. For non-UTF-8 data, pass encoding explicitly.

Request parameters

JSON body fields:

FieldTypeRequiredDescription
inputstringYesThe Base64 string to decode.
encodingstringNoOutput character set, e.g. UTF-8, ASCII, ISO-8859-1. Defaults to auto-detect.

Response

On success, 200 OK with the decoded text as text/plain. On failure, a JSON object with an error field (see Errors).

HTTP
POST /api/decode  {"input":"SGVsbG8sIFdvcmxkIQ=="}

200 OK  text/plain
Hello, World!

Rate limits & size

  • 10 requests per minute per IP address. Over the limit returns 429.
  • 1 MB maximum input size. Larger payloads return 400.

Examples

cURL

bash
curl -X POST https://yobase64decode.com/api/decode \
  -H "Content-Type: application/json" \
  -d '{"input": "SGVsbG8sIFdvcmxkIQ==", "encoding": "UTF-8"}'

JavaScript

javascript
const res = await fetch("https://yobase64decode.com/api/decode", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ input: "SGVsbG8sIFdvcmxkIQ==" }),
});
console.log(await res.text()); // Hello, World!

Python

python
import requests

r = requests.post(
    "https://yobase64decode.com/api/decode",
    json={"input": "SGVsbG8sIFdvcmxkIQ=="},
)
print(r.text)  # Hello, World!

PHP

php
<?php
$ch = curl_init("https://yobase64decode.com/api/decode");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_POST, true);
curl_setopt($ch, CURLOPT_HTTPHEADER, ["Content-Type: application/json"]);
curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode(["input" => "SGVsbG8sIFdvcmxkIQ=="]));
echo curl_exec($ch);

Go

go
package main

import (
    "bytes"
    "fmt"
    "io"
    "net/http"
)

func main() {
    body := bytes.NewBufferString(`{"input":"SGVsbG8sIFdvcmxkIQ=="}`)
    resp, _ := http.Post("https://yobase64decode.com/api/decode", "application/json", body)
    defer resp.Body.Close()
    out, _ := io.ReadAll(resp.Body)
    fmt.Println(string(out)) // Hello, World!
}

Errors

StatusWhen
400Missing input, invalid Base64, or input over 1 MB.
405A method other than POST was used.
429Rate limit exceeded (more than 10 requests/minute).

Errors return JSON (not plain text), so branch on the status code:

json
{ "error": "Invalid Base64 input" }