Base64 Encode Decode Online

Encode text to Base64 or decode Base64 strings back to plain text. Free, instant, works in your browser.

About Base64 Encoding

Base64 is a binary-to-text encoding scheme that represents binary data using 64 printable ASCII characters. It's widely used to encode binary data for transmission over text-based protocols like HTTP, email (MIME), and embedding data in HTML/CSS.

Common Use Cases

• Encode binary files (images, PDFs) for embedding in HTML or JSON payloads.

• Decode Basic Authentication headers (Authorization: Basic ...).

• Work with email attachments and MIME-encoded content.

• Encode API credentials and tokens for safe transmission.

API Example

## Encode with curl
curl -X POST https://apitoolkit.pro/api/v1/base64 \
  -H "X-Api-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"action":"encode","input":"Hello, World!"}'

## Decode with JavaScript
const res = await fetch('https://apitoolkit.pro/api/v1/base64', {
  method: 'POST',
  headers: { 'X-Api-Key': 'YOUR_API_KEY', 'Content-Type': 'application/json' },
  body: JSON.stringify({ action: 'decode', input: 'SGVsbG8sIFdvcmxkIQ==' })
});
const { result } = await res.json();
console.log(result); // "Hello, World!"

Get API Key — $5/mo →

Other Free Developer Tools