Base64 Encode / Decode

Encode strings to Base64 and decode Base64 back to plain text. Supports standard and URL-safe (base64url) variants.

Get API Key

Overview

Use Cases

  • Encode binary data for safe transmission in JSON or HTML
  • Decode Base64 payloads from third-party APIs or webhooks
  • Build developer tools and data inspection utilities
  • URL-safe encoding for tokens in URLs and filenames
  • Encoding credentials for Basic Auth headers

Features

Standard Base64 encoding and decoding (RFC 4648)
URL-safe Base64 encoding and decoding (base64url, RFC 4648 Β§5)
Returns 422 with a clear error for invalid Base64 input
Zero dependencies β€” fast, in-memory only

API Endpoints

Encode

Encode a plain-text string to Base64

POST
https://requiems.xyz/v1/technology/base64/encode

Parameters

Name Type Required Description
value string Required The string to encode
variant string Optional Encoding variant: standard (default) or url (URL-safe base64url)

Try it out

Live Demo
Request

The string to encode

Encoding variant: standard (default) or url (URL-safe base64url)

Response Fields

Field Type Description
result string The Base64-encoded output

Code Examples

curl -X POST https://requiems.xyz/v1/technology/base64/encode \
  -H "requiems-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"value": "Hello, world!"}'

# URL-safe variant
curl -X POST https://requiems.xyz/v1/technology/base64/encode \
  -H "requiems-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"value": "Hello, world!", "variant": "url"}'

Error Responses

400

bad_request

Missing or empty value field

422

validation_failed

Validation constraint on the variant field (must be standard or url)

Decode

Decode a Base64-encoded string back to plain text

POST
https://requiems.xyz/v1/technology/base64/decode

Parameters

Name Type Required Description
value string Required The Base64-encoded string to decode
variant string Optional Encoding variant: standard (default) or url (URL-safe base64url)

Try it out

Live Demo
Request

The Base64-encoded string to decode

Encoding variant: standard (default) or url (URL-safe base64url)

Response Fields

Field Type Description
result string The decoded plain-text output

Code Examples

curl -X POST https://requiems.xyz/v1/technology/base64/decode \
  -H "requiems-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"value": "SGVsbG8sIHdvcmxkIQ=="}'

# URL-safe variant
curl -X POST https://requiems.xyz/v1/technology/base64/decode \
  -H "requiems-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"value": "SGVsbG8sIHdvcmxkIQ==", "variant": "url"}'

Error Responses

400

bad_request

Missing or empty value field

422

invalid_base64

The value is not valid Base64 and cannot be decoded

Encode Batch

Encode multiple strings to Base64 in a single request

POST
https://requiems.xyz/v1/technology/base64/encode/batch

Parameters

Name Type Required Description
values array<string> Required List of values to encode
variant string Optional Encoding variant (standard or url)

Try it out

Live Demo
Request

List of values to encode

Encoding variant (standard or url)

Response Fields

Field Type Description
results array<object> Encoded results
total integer Number of processed items

Code Examples

curl -X POST "https://requiems.xyz/v1/technology/base64/encode/batch" \
  -H "requiems-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"values":["Hello","World"],"variant":"standard"}'

Error Responses

422

validation_failed

Invalid variant or values list size outside 1-50

Decode Batch

Decode multiple Base64 strings in a single request

POST
https://requiems.xyz/v1/technology/base64/decode/batch

Parameters

Name Type Required Description
values array<string> Required List of Base64 strings to decode
variant string Optional Encoding variant (standard or url)

Try it out

Live Demo
Request

List of Base64 strings to decode

Encoding variant (standard or url)

Response Fields

Field Type Description
results array<object> Decoded results
total integer Number of processed items

Code Examples

curl -X POST "https://requiems.xyz/v1/technology/base64/decode/batch" \
  -H "requiems-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"values":["SGVsbG8=","V29ybGQ="],"variant":"standard"}'

Error Responses

422

validation_failed

Invalid variant or values list size outside 1-50

Frequently Asked Questions