xtract.bot
POST /api/base64-decode

Decode standard or URL-safe base64 to bytes. Whitespace and base64url variants are accepted; padding is optional.

Decodes a base64 string back to the original bytes. Handles: - Standard base64 (RFC 4648 §4, with `+` and `/`). - URL-safe base64 (RFC 4648 §5, with `-` and `_`). - Embedded whitespace and newlines (silently stripped). - Optional or missing padding (the `=` characters at the end). Use cases: decoding inline data URIs, decoding base64-encoded API payloads, recovering binary content from base64 logs.

Inputs

NameTypeDefaultDescription
encoded*stringBase64 or base64url text. Whitespace and missing padding are tolerated.

Response

Modes: binary, json. Cache: yes (24h TTL).

Code samples

Built from the hello example.


curl -X POST https://api.xtract.bot/api/base64-decode \
  -H "Content-Type: application/json" \
  -H "Accept: application/octet-stream" \
  -H "X-Account-Id: $XTRACT_ACCOUNT_ID" \
  -H "X-Api-Key: $XTRACT_API_KEY" \
  -d '{
  "encoded": "SGVsbG8sIHdvcmxkIQ=="
}'