Base64 encode and decode
base64Encodes UTF-8 text to standard or url-safe base64, or decodes either form; binary results that are not valid UTF-8 come back as hex. Returns encode: { base64, variant, bytes } · decode: { text | null, hex | null, utf8, bytes } Price: 1 credit (1 credit = 1 CAD cent) per successful call; input that does not match the schema is rejected before billing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | Yes | Text to encode, or base64 (standard or url-safe, padding optional) to decode. | |
| mode | Yes | encode turns text into base64; decode turns base64 into text (or hex). | |
| variant | No | Output alphabet when encoding: standard (+/ and padding) or url (-_ without padding). | standard |