# Image Format Converter (`rixin/image-format-converter`) Actor

From $0.05/1k images. Image Format Converter - Transform images between JPEG, PNG, WebP, BMP, GIF, TIFF, ICO, and AVIF formats. Supports batch processing with adjustable quality settings. Input any URL or Apify storage file. Fast and reliable.

- **URL**: https://apify.com/rixin/image-format-converter.md
- **Developed by:** [Rixin Sc](https://apify.com/rixin) (community)
- **Categories:** Developer tools, Automation, Integrations
- **Features:** Limited permissions
- **Stats:** 6 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $0.01 / 1,000 results

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

### What does Image Format Converter do?

Image Format Converter transforms images between popular formats. Perfect for batch converting product photos, optimizing images for web, or standardizing image collections.

- Convert images between **8 formats** including JPEG, PNG, WebP, AVIF, and more
- **Batch processing** - convert hundreds of images in a single run
- Adjustable **quality settings** (1-100) for lossy formats
- Output files stored in **Key-Value Store** with direct download URLs
- Export results via **JSON, CSV, Excel**, or integrate with any workflow
- Connect to any AI chatbot using **Apify MCP server**

### What formats are supported?

|     |     |     |
| --- | --- | --- |
| JPEG | PNG | WebP |
| BMP | GIF | TIFF |
| ICO | AVIF | |

### How to convert images with Image Format Converter?

1. [Create](https://console.apify.com/sign-up) a free Apify account using your email.
2. Open [Image Format Converter](https://apify.com/store).
3. Add image URLs that you want to convert.
4. Select your desired output format and quality.
5. Click the "Start" button and wait for the conversion to complete.
6. Download your converted images from the Key-Value Store.

### Input

Configure the converter with these parameters:

- **files**: Array of image URLs to convert (required)
- **outputFormat**: Target format - jpeg, png, webp, bmp, gif, tiff, ico, avif (default: png)
- **quality**: Quality for lossy formats, 1-100 (default: 85)

#### Input JSON

```json
{
    "files": [
        "https://example.com/photo.jpg",
        "https://example.com/logo.png"
    ],
    "outputFormat": "webp",
    "quality": 90
}
```

### Output

Converted images are saved to the **Key-Value Store** with direct download URLs. Metadata for each conversion is pushed to the **Dataset**.

Here's an example of the output data:

```json
{
    "inputFileUrl": "https://example.com/photo.jpg",
    "inputFileName": "photo.jpg",
    "outputFormat": "webp",
    "outputFileKey": "photo-1706789012345.webp",
    "outputFileUrl": "https://api.apify.com/v2/key-value-stores/abc123/records/photo-1706789012345.webp",
    "inputSizeBytes": 2097152,
    "outputSizeBytes": 524288,
    "processingTimeMs": 892,
    "processedAt": "2024-02-01T12:30:00.000Z"
}
```

### How can I use converted images?

- **Web optimization** - convert to WebP or AVIF for 30-50% smaller file sizes
- **E-commerce** - batch convert product images to consistent formats
- **Archiving** - convert to lossless formats like PNG or TIFF for preservation
- **Cross-platform support** - ensure images work on all browsers and devices
- **Social media** - prepare images for platform-specific requirements
- **Print preparation** - convert to formats suitable for printing

### FAQ

#### How much does it cost to use Image Format Converter?

Image Format Converter uses the **pay-per-event** (PPE) pricing model. You're charged **$0.00005 per image** processed. For example, converting 100 images costs $0.005. Your costs can be easily calculated using the information in the Actor's pricing tab.

#### Can I use integrations with Image Format Converter?

You can integrate Image Format Converter with almost any cloud service or web app. We offer integrations with **Make, Zapier, Slack, Airbyte, GitHub, Google Sheets, Google Drive**, and plenty more.

Alternatively, you could use webhooks to carry out an action whenever an event occurs, such as getting a notification when Image Format Converter successfully finishes a run.

#### Can I use Image Format Converter with the Apify API?

The Apify API gives you programmatic access to the Apify platform. The API is organized around RESTful HTTP endpoints that enable you to manage, schedule, and run Apify Actors. The API also lets you access any datasets, monitor Actor performance, fetch results, create and update versions, and more.

To access the API using Node.js, use the `apify-client` NPM package. To access the API using Python, use the `apify-client` PyPI package.

#### Can I use Image Format Converter through an MCP Server?

With Apify API, you can use almost any Actor in conjunction with an MCP server. You can connect to the MCP server using clients like Claude Desktop and LibreChat, or even build your own.

#### Your feedback

We're always working on improving the performance of our Actors. If you have any technical feedback for Image Format Converter or found a bug, please create an issue in the Issues tab.

# Actor input Schema

## `files` (type: `array`):

URLs of image files to convert. One URL per line. Supports any public URL or Apify storage URLs.

## `outputFormat` (type: `string`):

Target image format for conversion

## `quality` (type: `integer`):

Output image quality (1-100). Only applies to lossy formats like JPEG and WebP.

## Actor input object example

```json
{
  "files": [
    "https://picsum.photos/800/600.jpg"
  ],
  "outputFormat": "png",
  "quality": 85
}
```

# Actor output Schema

## `results` (type: `string`):

URL to the dataset containing conversion results and metadata

## `convertedImages` (type: `string`):

URL to the key-value store containing converted image files

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "files": [
        "https://picsum.photos/800/600.jpg"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("rixin/image-format-converter").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = { "files": ["https://picsum.photos/800/600.jpg"] }

# Run the Actor and wait for it to finish
run = client.actor("rixin/image-format-converter").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "files": [
    "https://picsum.photos/800/600.jpg"
  ]
}' |
apify call rixin/image-format-converter --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,rixin/image-format-converter"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/a2K8kZpUacH8LSJSf/builds/8YOEyWfqhXgQMx99J/openapi.json
