Skip to content
synthreo.ai

Convert Base64 To File - Synthreo Builder

Convert Base64 To File node for Builder - decode Base64-encoded strings back into binary files (images, PDFs, documents) for storage, download, or further processing in a workflow.


The ConvertBase64ToFile node transforms Base64-encoded strings into actual binary files such as images, PDFs, and documents.

This is especially useful when working with APIs, databases, or upload handlers that return file data as Base64 text. The node supports saving files to organized folder paths and passing file references downstream in your workflow for further processing, storage, or delivery.


NameTypeRequiredDefaultDescription
Base64 Value ExpressionText (dynamic)RequiredEmptyPath to the field in the incoming data that contains the Base64-encoded string. Supports dynamic expressions referencing upstream node output.
File Extension Property PathText (dynamic)RequiredEmptyPath to the field containing the target file extension (e.g., pdf, jpg, png). Used to determine the output file format.
NameTypeRequiredDefaultDescription
Save FileToggle (On/Off)OptionalOffWhen enabled, the converted file is written to storage at the location defined by Folder Path. When disabled, the file data is passed forward in memory without being persisted to disk.
Folder PathText (dynamic)Optional"base64_decoder"The folder path where converted files are saved. Only applies when Save File is enabled. Supports dynamic expressions such as client_documents/{{client_id}}.
NameTypeRequiredDefaultDescription
OptionDropdownOptionalOriginal with appended result columnControls how the output record is structured. Original with appended result column retains all incoming fields and adds the file reference as a new column. Return result column only outputs only the file reference field, discarding the original input fields.
Result Property NameTextOptional"file_result"The name of the output column that holds the converted file reference or file path.

When the node executes, it reads the Base64 string from the field identified by Base64 Value Expression and decodes it into raw binary data. The File Extension Property Path tells the node what format to produce. If Save File is on, the binary data is written as a file to the specified Folder Path. The resulting file reference is then placed into the output column defined by Result Property Name, and the full record is passed to the next node according to the selected Option.


A workflow receives PDF documents from an external API that encodes files as Base64 strings. The node decodes each string and saves the file to a structured folder for downstream review.

Configuration:

  • Base64 Value Expression: api_response.file_data
  • File Extension Property Path: api_response.file_type
  • Save File: On
  • Folder Path: client_documents/incoming/{{client_id}}
  • Option: Original with appended result column
  • Result Property Name: processed_document

Outcome: Base64 strings are decoded into PDFs, saved under client-specific folders, and the output record includes the file path alongside all original API response fields.

A workflow processes Base64-encoded images retrieved from a database and passes them to an image analysis node without writing to disk.

Configuration:

  • Base64 Value Expression: db_record.thumbnail_base64
  • File Extension Property Path: db_record.image_format
  • Save File: Off
  • Option: Return result column only
  • Result Property Name: decoded_image

Outcome: The decoded image binary is passed to the next node without any files being saved to storage.


  • File organization: Use dynamic expressions in Folder Path to create structured directories, such as uploads/{{year}}/{{client_id}}/files. This prevents flat folder accumulation at scale.
  • Extension validation: Confirm that the File Extension Property Path field contains a clean extension value (e.g., pdf, not .pdf or application/pdf). Wrong or malformed extensions can produce files that cannot be opened.
  • Data validation: Verify that the Base64 string is complete and valid before this node runs. Truncated or corrupted Base64 data will produce an unusable file.
  • Performance: When processing large batches or large individual files, run a sample test first. Base64-encoded files are approximately 33% larger than their binary counterparts, which affects memory and I/O.
  • Security: When saving files to shared storage, apply appropriate access controls, retention policies, and encryption at rest to protect sensitive file content.
  • Downstream compatibility: When passing file references to other nodes (such as email attachment or storage nodes), ensure those nodes expect the output format produced by the selected Option.

The most common cause is an incorrect or mismatched file extension. Verify that the value resolved by File Extension Property Path matches the actual format of the Base64 data. For example, if the API returns a PNG image encoded as Base64 but the extension field contains jpg, the resulting file will have the wrong format header.

No file is saved despite Save File being enabled

Section titled “No file is saved despite Save File being enabled”

Check that the Folder Path resolves to a valid, writable directory. If the path contains dynamic expressions, confirm the referenced fields are populated in the incoming data. An unresolvable expression may silently fall back to the default path or produce an error.

Ensure Result Property Name is set to a unique, non-colliding column name. If the name matches an existing field in the incoming data, the behavior depends on node configuration. Using a clearly distinct name such as converted_pdf avoids ambiguity.

This occurs when the input string is not valid Base64. Common causes include extra whitespace, incomplete strings from truncated API responses, or strings that include a data URI prefix (e.g., data:application/pdf;base64,). Strip the prefix before passing the value to this node if your source includes it.


  • Given: Valid Base64 string of a PDF with File Extension Property Path = "pdf", Save File = On - Expected: Valid PDF file created at the specified folder path; output column contains the file reference.
  • Given: Valid Base64 string of a PNG with Save File = Off - Expected: Decoded image binary available in output column; no file written to disk.
  • Given: Malformed or truncated Base64 string - Expected: Error indicating invalid Base64 input; no partial file written.
  • Given: File Extension Property Path resolves to an empty string - Expected: Error or fallback behavior; review extension field mapping.

IndustryChallengeHow Node HelpsOutcome
HealthcareMedical imaging systems export scans as Base64 dataConverts scans into standard formats, stores securely with patient IDsReduces processing time, ensures compliant record storage
Financial ServicesMobile apps send signatures and documents as Base64Converts into proper file formats, saves in secure folder structuresImproves processing efficiency, maintains compliance
Marketing AgenciesClient assets arrive as Base64 strings from varied sourcesConverts to usable working files, organizes by campaign and clientCuts asset preparation time, improves creative workflow productivity

  • ConvertFileToBase64 - Encodes binary files into Base64 strings, the inverse of this node.
  • FileToText - Extracts readable text from files produced by this node.
  • Send Email - Can use file references produced by this node as email attachments.