Skip to content
synthreo.ai

Convert File To Base64

Convert File To Base64 node for Builder — encode images, PDFs, and binary files into Base64 strings for API submission, JSON storage, and workflow integration.


The ConvertFileToBase64 node converts files (such as images, PDFs, or other binary formats) into Base64-encoded strings.

This is useful when preparing files for APIs, JSON storage, or database fields that only accept text-based data. The node supports file reading, encoding, and structured data output for seamless integration in automated workflows.


NameTypeRequiredDefaultDescription
File Path ExpressionText (dynamic)RequiredEmptyPath to the field containing the file location or reference.
NameTypeRequiredDefaultDescription
Read FileToggle (On/Off)OptionalOnEnable to read file contents for encoding.
Include MetadataToggle (On/Off)OptionalOffInclude file metadata (e.g., name, size, MIME type) in output.
NameTypeRequiredDefaultDescription
OptionDropdownOptionalOriginal with appended result columnDefines output format: - Original with appended result column: Keep input data and add encoded string column. - Return result column only: Only return Base64 string.
Result Property NameTextOptional"base64_result"Column name containing the Base64-encoded output.

  • Configuration:

    • File Path Expression: Path to uploaded image file
    • readFile: On
    • includeMetadata: On
    • outTransformId: Original with appended result column
    • outColumnName: "encoded_image"
  • Outcome: The file is read, converted into a Base64 string, and attached as a new field in the workflow output, ready for API submission.


  • File Size: Avoid encoding very large files; Base64 increases data size by about 33%.
  • Validation: Confirm file existence and read permissions before encoding.
  • Security: Sanitize file paths to prevent unauthorized file access.
  • Efficiency: Cache or reuse encoded strings when repeatedly sending the same file.
  • Consistency: Match encoding and decoding nodes to maintain format integrity.

  • Given: Image file at path uploads/sample.jpgExpected: Base64 string output containing the encoded image data.
  • Given: Nonexistent file path → Expected: Error or empty output with logged warning.

IndustryChallengeHow Node HelpsOutcome
HealthcareAPIs require diagnostic files as Base64 textEncodes patient scans or reports for secure transmissionEnables integration with health data APIs securely
FinanceDigital signatures must be submitted in Base64 formatConverts files for compliant electronic document workflowsSimplifies compliance processes, reduces manual prep
MarketingCampaign automation needs inline images for emailsEncodes media assets into Base64 for embeddingSpeeds campaign assembly, reduces upload errors