// make.com integration

File to Base64 (from URL)

The File to Base64 module downloads a file from a URL and returns its Base64 encoding plus a ready-to-embed data URI. It is the quickest way to inline logos, icons or fonts into HTML templates in Make.com.

How it works

You provide a public URL. The module downloads the file (following redirects), detects its content type, and returns the raw Base64 string alongside a complete data URI like data:image/png;base64,iVBOR... that you can drop straight into an src attribute or a CSS rule.

Module Fields

FieldDescriptionHow to use it
ConnectionLinks the module to the CustomJS serviceSelect or create a connection using your API key
File URLThe file to download and encodeA public http(s) URL. Redirects are followed automatically. Maximum file size is 8 MB

Usage example

Embed a company logo into a PDF invoice template:

  1. File to Base64: File URL https://example.com/logo.png
  2. Map the Data URI output into your HTML template:
<img src="{{Data URI}}" alt="Logo" width="160">
  1. Pass the HTML to the HTML to PDF module.

The logo is now part of the HTML itself, so the PDF renderer never has to fetch it, which makes rendering faster and immune to broken image links.

Output

OutputDescription
Base64The raw Base64 string of the file content
Data URIA complete data:<content-type>;base64,... string, ready for src attributes or CSS url() values
Content TypeThe detected MIME type, e.g. image/png
Size (bytes)The file size in bytes

Good to know

  • Typical use is PDF templates. Embedding logos, icons or fonts via the data URI is the most reliable way to get assets into HTML to PDF renders. The same pattern works with the HTML to PDF REST API.
  • 8 MB limit. Files larger than 8 MB throw an error. Resize or compress large images before encoding; Base64 also inflates data by roughly a third, so smaller is better anyway.
  • Public URLs only. The URL must be reachable without authentication over http(s).

See the Make.com integration overview for setup instructions, and check out the other utility modules: Group & Aggregate Array, AI JSON Parser, Parse Localized Number and Format Date & Convert Timezone. More cleanup recipes are in Data cleanup snippets for Make.