Shape · Text

Base64

Encodes a column to base64 text, or decodes base64 back to text or raw bytes.

Also known as: Encode, decode

How it works

Pick the Column and a Direction. Encode turns text (as UTF-8) or a binary column into base64 text. Decode turns base64 back into UTF-8 text, or into raw bytes when Keep as bytes (BLOB) is ticked. A value that is not valid base64, or decodes to something that is not UTF-8 when text is requested, becomes null and the node reports how many values it lost. Output column blank writes in place.

Inputs and outputs

Inputs

  • data — Table

Outputs

  • data — Table

Settings

The Attributes panel of Base64, as in the app: the controls work, but nothing runs — there is no data behind it.

The same settings, as the Assistant writes them
{
  column: string
  direction: "encode"|"decode"
  decodeToBytes?: boolean
  outputColumn?: string
}

encode takes text (as UTF-8) or BLOB; decode returns UTF-8 text unless decodeToBytes; an undecodable value becomes NULL with a warning; blank outputColumn = in place

Example

An API dump holds a payload column of base64 JSON. Decode payload into payload_json, then read the fields out of the text.