Skip to main content

Base64 Encode

Command description

Encodes content as Base64.

Command Input Parameters

input parametersInput parameter typeDescription
ContentanyContent to encode
Output TextboolWhen True, returns a string; when False, returns bytes

Command Output Parameters

Output parametersOutput parameter typeDescription
Encoded Contentstr or bytesBase64 encoding result

AI Workflow Generation Notes

  • Byte input is encoded directly. Other values are converted to strings and encoded as UTF-8 first.
  • This command returns pure Base64 content and does not add a Data URL prefix such as data:image/png;base64,.
  • To use encoded binary content as a webpage image source, prepend the Data URL prefix for the actual media type.
  • Encoding text with Output Text enabled returns a string.