Base64
File To Base64
Converts the content of a file into a Base64 string.
File To Base64 reads a file and gives you its content as one Base64 string. Use it when an API expects a file inside a JSON body (for example an attachment or a document upload) instead of a file upload.
Add the action
In the Process Designer toolbox, open Base64 and pick File To Base64 (or type File To Base64 in the search box).

Inputs and outputs
| Field | Direction | Type | Required | What to put / what you get |
|---|---|---|---|---|
| File | Input | File | Yes | The file to convert. Any file type works: text, PDF, image, spreadsheetโฆ |
| Base64 Content | Output | Text | Yes | The whole content of the file, Base64-encoded. |
Example
A text file hello.txt with the two lines Hello, PROCESIO! and Second line ฤรฎศ โ Base64 Content SGVsbG8sIFBST0NFU0lPIQpTZWNvbmQgbGluZSDEg8OuyJk=.
Good to know
- The output is only the Base64 text. It has no
data:โฆ;base64,prefix and does not include the file name; send the name in a separate field if the receiving system needs it. - Base64 is about one third larger than the file itself. Very large files give very long strings, which some APIs refuse.
- If no file is passed, the step fails with "Input file can't be null.".
- To rebuild the file from the string, use Base64 To File.

