> For the complete documentation index, see [llms.txt](https://docs.diaflow.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.diaflow.io/studio/nodes/action-nodes/file-converter.md).

# File converter

Convert one file from one format to another inside your workflow.

## File converter

### What does it do?

The **File converter** node changes one file into another format inside your workflow. Think of it like an office assistant who takes a document in one format, saves it in a new format, and hands back a fresh download link.

It works well for common business conversions like **PDF to PNG**, **XLSX to CSV**, **CSV to JSON**, or **HTML to PDF**.

#### Smart features

* **Accepts direct files or earlier workflow outputs**: use a file link directly or select a file from a previous step.
* **Checks the source format before converting**: Diaflow confirms the file matches the format you selected in **Original file format**.
* **Returns ready-to-use file links**: each converted file comes back as a downloadable link for the next step.
* **Can return more than one output file**: some conversions, such as **PDF to PNG**, can create one file per page.
* **Can reuse recent conversion results**: if caching is turned on, Diaflow can return a recent result instead of converting the same file again.

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FRlE1RGOCPMbO2lzFt6pz%2FCap%202026-06-05%20at%2010.17.27.gif?alt=media&amp;token=334c617d-23d0-4ac1-9d0c-80b3c20907a3" alt=""><figcaption></figcaption></figure>

### Real-World Business Value

* Turn supplier spreadsheets into **CSV** before loading them into another system.
* Convert signed **PDF** contracts into **PNG** pages for review, approval, or visual processing.
* Change exported **CSV** or **XLSX** reports into **JSON** for downstream automation steps.

### Step-by-Step Setup

* Drag **File converter** onto the canvas.
* In **Original file**, select the file you want to convert from a previous step or file input.
* In **Original file format**, choose the current format of that file, such as `pdf`, `xlsx`, `csv`, `docx`, `png`, or `json`.
* In **Target file format**, choose the format you want to create.
* If your workflow uses repeated conversions of the same file, turn on **Cache** only if you want Diaflow to reuse recent results.
* If **Cache** is on, set **Caching time** to a short period such as `60` seconds.
* Run the workflow and use the returned file link in the next step or in an **Output** node.

### The Transformation: Before & After

**Before  file and conversion settings entering the node**

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FafcCDs6xz09ZzqogokMb%2Frounded-image%20-%202026-06-04T150222.627.png?alt=media&amp;token=e9513f6a-0ca1-45e6-aa0e-49ab44d1c656" alt=""><figcaption></figcaption></figure>

**After  converted file links returned by the node**

<figure><img src="https://3864624312-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FRdo1pkMnofwxf3lpWftw%2Fuploads%2FJzmLZTJOliNOHFe54dz2%2Frounded-image%20-%202026-06-04T150133.239.png?alt=media&amp;token=a47a7d10-c777-4d8c-9836-841ecedc8f2d" alt=""><figcaption></figcaption></figure>

In this example, one **PDF** becomes one **PNG** file per page.

### Tips & Warnings for First-Timers

#### Best practices

* Convert **one file at a time**.
* Match **Original file format** to the real file extension exactly.
* Start with a small test file before converting a very large document.
* Use **Loop** if you need to convert many files in one workflow.
* Keep **Caching time** short if you enable **Cache**.

#### Warnings

* Do not pass more than one file into this node. It supports only one file per run.
* Do not choose the wrong source format in **Original file format**. The conversion will fail.
* Do not use incomplete or broken file links. The file must be reachable by the workflow.
* Do not assume every source format can convert into every target format. Some format pairs are not supported.
* Do not use very large files for your first test. Large files can take longer or fail during conversion.
* Do not expect **Base64** output to behave like a normal binary file download. It is returned as text content.
* Do not rely on old cached file links for too long. Reused links can stop working after they expire.

### Need help?

* Learn the basics in [How a node works](/studio/lets-start-with-the-basics/how-a-node-works.md)
* Build the full flow in [Create a workflow](/studio/manage-a-workflow/create-a-workflow.md)
* Browse related nodes in [Component List](/studio/component-list.md)
