Base64 Encode / Decode

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

Get API Key

Vue d'ensemble

Cas d'utilisation

  • 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

Fonctionnalités

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

Points de terminaison de l'API

Encode

Encode a plain-text string to Base64

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

Paramètres

Nom Type Requis Description
value string Requis The string to encode
variant string Facultatif Encoding variant: standard (default) or url (URL-safe base64url)

Essayez-le

Démo en direct
Requête

The string to encode

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

Champs de réponse

Champ Type Description
result string The Base64-encoded output

Exemples de code

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"}'

Réponses d'erreur

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

Paramètres

Nom Type Requis Description
value string Requis The Base64-encoded string to decode
variant string Facultatif Encoding variant: standard (default) or url (URL-safe base64url)

Essayez-le

Démo en direct
Requête

The Base64-encoded string to decode

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

Champs de réponse

Champ Type Description
result string The decoded plain-text output

Exemples de code

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"}'

Réponses d'erreur

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

Paramètres

Nom Type Requis Description
values array<string> Requis List of values to encode
variant string Facultatif Encoding variant (standard or url)

Essayez-le

Démo en direct
Requête

List of values to encode

Encoding variant (standard or url)

Champs de réponse

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

Exemples de code

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"}'

Réponses d'erreur

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

Paramètres

Nom Type Requis Description
values array<string> Requis List of Base64 strings to decode
variant string Facultatif Encoding variant (standard or url)

Essayez-le

Démo en direct
Requête

List of Base64 strings to decode

Encoding variant (standard or url)

Champs de réponse

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

Exemples de code

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"}'

Réponses d'erreur

422

validation_failed

Invalid variant or values list size outside 1-50

Foire aux questions