Base64 Encoder / Decoder

Encode or decode Base64 strings.

Input
Output
All examples use BASE_URL — set it to your deployment URL.
POST/api/base64/encode
Encode a string to Base64.
const BASE_URL = "http://localhost:3000"; const res = await fetch(`${BASE_URL}/api/base64/encode`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ text: "Hello World" }) }); const data = await res.json(); // → { success: true, result: "SGVsbG8gV29ybGQ=" }
POST/api/base64/decode
Decode a Base64 string back to text.
await fetch(`${BASE_URL}/api/base64/decode`, { method: "POST", headers: { "Content-Type": "application/json" }, body: JSON.stringify({ text: "SGVsbG8gV29ybGQ=" }) }); // → { success: true, result: "Hello World" }