NodeCrypto Help

Base64 to Bytes

Category: Data Conversion & Encoding · Node Type ID: converter-base64-to-bytes

Decodes Base64 or Base64URL string into raw byte array

Overview

Decodes a Base64 or Base64URL string (RFC 4648) into a raw byte array (Uint8Array). The decoder automatically normalizes URL-safe characters (- → +, _ → /), ignores whitespace, and restores missing = padding before decoding.

This makes a single node capable of decoding standard padded Base64, unpadded Base64, and URL-safe Base64URL strings without manual reconfiguration.

When to Use

Parameter Configuration

This node has no configurable static parameters in the property inspector; its runtime behavior is determined entirely by its algorithm specification and connected ports.

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 NamePort IDData TypeRequiredVisibility ConditionDescription
Base64 In string String Required Always visible Base64 or Base64URL string to decode (with or without = padding).

Output Ports

Port Nature: Fixed Output Ports (1 total).

Port NamePort IDData TypeVisibility ConditionDescription
Bytes Out bytes Bytes Always visible Decoded raw byte array (Uint8Array).

Error Cases

When any of the following conditions occurs at runtime, this node transitions to an ERROR state and downstream nodes connected to its outputs do not execute.

Error CodeDefault Engine MessageTrigger Condition
INVALID_BASE64_INPUT Invalid Base64 string Raised when the input string contains invalid Base64/Base64URL characters or has an invalid remainder length (len % 4 === 1).

Examples

Decoding a Base64URL Ciphertext

Decode a URL-safe token back into raw bytes.

  1. Connect the Base64URL string to the Base64 String input port.
  2. Connect the Bytes output port to your downstream decrypt or verify node.