Bytes to Base64
Encodes raw byte array into Base64 / Base64URL string
Overview
Encodes a raw byte array (Uint8Array) into an ASCII string using RFC 4648 Base64 (A-Z, a-z, 0-9, +, /) or URL-safe Base64URL (- and _ in place of + and /).
You can also control whether trailing = padding characters are included or stripped, which is required when constructing JWT segments, JWK fields, or URL query tokens.
When to Use
- Encoding binary ciphertexts, public keys, or signatures for transport in JSON, HTTP headers, or PEM-style payloads.
- Producing unpadded Base64URL strings (
Variant = url_safe,Include Padding = false) for JWTs, WebAuthn challenges, or URL tokens.
Parameter Configuration
| Parameter (ID) | Type & Default | Visibility Condition | Description & Options |
|---|---|---|---|
Base64 Variantvariant |
selectDefault: standard |
Always visible | Selects RFC 4648 §4 standard alphabet (+/) or RFC 4648 §5 url_safe alphabet (-_).
|
Include Padding (=)padding |
booleanDefault: true |
Always visible | When enabled (true), pads the output string with = so its length is a multiple of 4. Disable for unpadded Base64URL tokens. |
Port I/O Specification
See Ports & Connections for general wiring rules, data type colors, and dynamic port creation.
Input Ports
Port Nature: Fixed Input Ports (1 total).
| Port Name | Port ID | Data Type | Required | Visibility Condition | Description |
|---|---|---|---|---|---|
Bytes In |
bytes |
Bytes |
Required | Always visible | Raw byte array (Uint8Array) to encode. |
Output Ports
Port Nature: Fixed Output Ports (1 total).
| Port Name | Port ID | Data Type | Visibility Condition | Description |
|---|---|---|---|---|
Base64 Out |
string |
String |
Always visible | Encoded Base64 or Base64URL string. |
Error Cases
This node has no runtime failure cases (errorProfile: none) and always succeeds for any valid typed input.
Examples
Encoding a Signature as Unpadded Base64URL for JWT
Format a 64-byte Ed25519 signature for use in a JWT token.
- Connect the
Signatureoutput of Ed25519 Sign to Bytes to Base64. - Set Base64 Variant to
URL-Safe (-_)and uncheck Include Padding (=).