> ## Documentation Index
> Fetch the complete documentation index at: https://learn.workflow.dog/llms.txt
> Use this file to discover all available pages before exploring further.

# Convert File to Data URL

> Encode a file as a base64 data URL.

**Convert File to Data URL** embeds a file's MIME type and base64-encoded bytes
in a single string.

## Input and output

| Direction | Field        | Type   | Description                                        |
| --------- | ------------ | ------ | -------------------------------------------------- |
| Input     | **File**     | File   | The file to encode.                                |
| Output    | **Data URL** | String | A string in the form `data:MIME_TYPE;base64,DATA`. |

Data URLs are useful when an API or HTML document expects embedded content
instead of a separate file.

<Note>
  Base64 increases the size of the data. Prefer a normal file upload when the
  receiving service supports one.
</Note>
