Skip to content
POST /api/v1/base64

Base64 Encode/Decode

Encode or decode Base64 strings

Parameters

name in type required description
input body string required Input Text
action body string required Action one of encodedecode default encode

Request

Send your key in the X-API-Key header. More languages and patterns live on the code examples page.

curl -s -X POST "https://apixies.io/api/v1/base64" \
  -H "X-API-Key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"input":"Hello, World!","action":"encode"}'

Response

The result sits under data in the standard envelope. See the response format guide for errors and status codes.

returns

data.output
The encoded or decoded string.
data.data_uri
Decoded binary as a data URI, only when is_binary is true.
data.is_binary
On decode, true when the result isn't valid UTF-8 text.
data.mime_type
Detected type of binary output, like image/png.
data.output_length
Length of the result in bytes.
example response 200
{
    "status": "success",
    "http_code": 200,
    "code": "SUCCESS",
    "message": "Base64 encode completed",
    "data": {
        "input": "Hello, World!",
        "output": "SGVsbG8sIFdvcmxkIQ==",
        "action": "encode",
        "input_length": 13,
        "output_length": 20,
        "converted_at": "2026-09-18T12:00:00+00:00"
    }
}

Authentication and limits

This endpoint needs an API key. Use the sandbox ("try it" above) to test it without registering. See the authentication guide for details.

Standard rate limits apply to this endpoint.

Common use cases

API payload encoding

Encode binary data, images, or files as Base64 strings for transmission in JSON API payloads where binary data isn't supported.

Email attachment handling

Encode and decode email attachments that are transmitted as Base64 in MIME format. Process attachments programmatically.

Data URI generation

Encode small images or fonts as Base64 data URIs for embedding directly in HTML or CSS, reducing HTTP requests.

More documentation

Get a free API key

A temporary key takes one click and no signup. Register and you get 75 requests/day. Free tier is for development & small projects.

cookies

We use analytics cookies to see how the site gets used. Nothing loads until you accept. Privacy policy