# HEIC to JPG Converter — iPhone Photos to JPEG in Bulk (`actor-forge/heic-to-jpg`) Actor

Convert HEIC/HEIF iPhone photos to JPG in bulk from URLs: upright, true colours (Display P3 to sRGB), EXIF and GPS location stripped, optional resize and ZIP download. Also WebP, PNG or PDF. $3 per 1,000 HEIC photos.

- **URL**: https://apify.com/actor-forge/heic-to-jpg.md
- **Developed by:** [ActorForge](https://apify.com/actor-forge) (community)
- **Categories:** Developer tools, Automation
- **Features:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $2.00 / 1,000 image processeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

Learn more: https://docs.apify.com/actors/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

## HEIC to JPG Converter — iPhone Photos to JPEG in Bulk

Convert HEIC/HEIF iPhone photos to JPG in bulk from URLs: upright, true colours (Display P3 to sRGB), EXIF and GPS location stripped, optional resize and ZIP download. Also WebP, PNG or PDF. $3 per 1,000 HEIC photos.

**Convert HEIC photos from iPhones to JPG in bulk.** Paste links to **.heic / .heif** files and get every photo back as a **JPEG** with a **direct download link**, or all of them in one **ZIP file**. Photos come out **upright** exactly as the phone shows them, the primary image of burst and multi-image files is used, and iPhone **Display P3 colours are converted to standard sRGB** so they look right in every browser, email client and CMS. **EXIF metadata including GPS location is stripped by default**, so converted photos never reveal where they were taken; each row still tells you whether the original had GPS. Optionally **resize** (max width/height), set a **target file size in KB**, or convert to **WebP, PNG or PDF** instead (merge a batch of phone photos into one PDF for receipts, reports or claims). Use it when Windows, Shopify, WordPress, marketplaces or web forms refuse HEIC uploads, to prepare iPhone photos for e-commerce listings, real-estate and insurance documentation, or as a HEIC conversion step for automation pipelines and AI agents. It decodes HEIC with the open-source libheif library, so there is no per-run photo limit and no app to install. **$3 per 1,000 HEIC photos** ($0.002 conversion + $0.001 HEIC decode) with no compute bill on top, versus $10 per 1,000 with the leading HEIC converter. Failed and unsupported files are never charged.

### What data does it return?

Every run outputs clean, schema-validated rows like these:

| fileName | format | width | height | originalFormat | originalBytes | outputBytes | hadGps |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 00001-IMG_4021.jpg | jpeg | 3992 | 2992 | heic | 2994394 | 2310412 | true |
| 00002-IMG_4022.jpg | jpeg | 2992 | 3992 | heic | 2540019 | 1987320 | true |
| 00003-example.jpg | jpeg | 1280 | 854 | heic | 718114 | 301876 | false |

### How much does it cost?

Transparent pay-per-event pricing — you only pay for what you get, and the
actor **always respects your run budget**: set a maximum total charge and it
stops cleanly at the cap instead of overrunning.

| Event | Price | Charged | Worked example |
| --- | --- | --- | --- |
| `image-processed` | $0.002 | per output image converted and delivered (resize, compression, metadata stripping and ZIP included) | Charged for every photo, HEIC or not |
| `heic-decoded` | $0.001 | per HEIC/HEIF source image decoded (iPhone photos; added on top of image-processed) | 100 iPhone photos to JPEG = 100 × ($0.002 + $0.001) = $0.30; 1,000 = $3.00 |
| `large-image` | $0.002 | per source image over 25 megapixels (all frames count for kept animations; added on top of image-processed; up to 50 MP accepted) | A 36 MP camera photo = $0.002 + $0.002 = $0.004; a 12 MP phone photo has no add-on |
| `pdf-created` | $0.002 | per PDF file created (each page image is also one image-processed) | 10 images merged into one PDF = 10 × $0.002 + $0.002 = $0.022; 10 images as 10 separate PDFs = $0.04 |
| `apify-actor-start` | $0.00005 | per run per GB of memory (platform start fee) | One run at 1 GB = $0.00005 |

### Input options

| Field | Type | Required | Default | Description |
| --- | --- | --- | --- | --- |
| `imageUrls` | array | yes | — | Direct links to HEIC/HEIF photos (iPhone, iPad, Samsung and other phones that save HEIF). JPEG, PNG, WebP, AVIF, GIF, TIFF and SVG links work too; the format is detected from the file itself. Up to 25 MB and 50 megapixels per image. |
| `format` | string | no | `"jpeg"` | WebP is the best all-round choice for websites (about 25-35% smaller than JPEG). AVIF is smaller still but slower to encode. JPEG is the most compatible (e.g. for iPhone HEIC photos). PDF puts the images into a PDF document (see the PDF options below). 'Keep' re-compresses each image in its own format (SVG becomes PNG, HEIC becomes JPEG). |
| `quality` | integer | no | `85` | JPEG quality. 85 (default) keeps photos visually identical to the HEIC; 75 gives smaller files. For PNG, anything below 100 reduces the colour palette; 100 = lossless. |
| `width` | integer | no | — | Resize so the image is at most this wide. Empty = keep the original width. Images are never enlarged. |
| `height` | integer | no | — | Resize so the image is at most this tall. Empty = keep the original height. |
| `fit` | string | no | `"inside"` | When both width and height are set: 'inside' keeps the aspect ratio within the box, 'cover' crops to fill the box exactly, 'contain' pads to the box with the background colour. |
| `background` | string | no | `"#ffffff"` | Hex colour used for padding ('contain') and for transparent areas when converting to JPEG. |
| `stripMetadata` | boolean | no | `true` | Remove EXIF, GPS location and camera details from the JPEGs (on by default, so you never share where a photo was taken). Each row still reports whether the original HEIC had EXIF / GPS. Turning this off keeps the colour profile; EXIF from HEIC files is not copied. |
| `maxFileSizeKb` | number | no | — | Optional. Lowers the quality step by step (and, if needed, the dimensions) until each image fits under this size. Rows show the quality used and whether the target was met. |
| `keepAnimation` | boolean | no | `true` | Animated GIF or WebP converted to WebP keep all frames. Off = first frame only. AVIF, JPEG and PNG output always use the first frame. |
| `outputMode` | string | no | `"links"` | 'Links' saves each image with its own download link. 'ZIP' bundles all images into ZIP files (up to 200 MB each; links in the OUTPUT record). 'Both' does both. A merged PDF is always a download link. |
| `filenamePattern` | string | no | `"{index}-{name}"` | Tokens: {index} (00001…), {name} (original file name), {width}, {height}, {format}. The extension is added automatically; duplicate names get a -2, -3… suffix. |
| `maxImages` | integer | no | `1000` | Stop after converting this many images. |
| `pdfMode` | string | no | `"merge"` | 'Merge' puts all images into one PDF, one image per page, in the order of your list. 'Separate' makes one PDF per image. |
| `pdfPageSize` | string | no | `"fit"` | 'Fit image' makes each page exactly the size of its image (96 dpi). A4 and Letter pages turn portrait or landscape to match each image, which is scaled to fill the page inside the margin. |
| `pdfMarginMm` | integer | no | `10` | White margin around the image on A4 and Letter pages. 'Fit image' pages have no margin. |
| `pdfFileName` | string | no | `"images"` | Name of the merged PDF (without .pdf). Very large merges are split into parts: name.pdf, name-part-2.pdf, ... |

### Limits & honest notes

- Input: direct links to the files (e.g. from cloud storage, a CMS, or a public URL). Files behind a login are not supported; iCloud shared-album pages are web pages, not file links.
- Each photo can be up to 25 MB and 50 megapixels. 12-24 MP iPhone photos cost $0.003; 48 MP HEIC photos also pay `large-image` ($0.002) and need 2 GB of memory or more.
- The primary image of each HEIC file is converted: bursts and multi-image files give one JPEG, Live Photo video is ignored, and depth maps and HDR gain maps are not used (HDR photos come out as standard-range JPEG).
- Colours: Display P3 photos are converted to sRGB (or keep their P3 profile if you turn metadata stripping off). EXIF (date taken, camera) from HEIC files is not copied to the JPEG; each row reports whether the original had EXIF and GPS.
- A target file size is a best effort: if an image can't reach it at minimum quality after one resize, it is delivered as small as possible and the row says `targetMet: false`.
- Download links work for the lifetime of the run's storage (Apify's default retention for your plan). ZIP files are split into parts of up to 200 MB.
- Internal and private network addresses are always refused, including through redirects or DNS tricks. Only convert images you have the right to use.
- Respects your run budget: set a maximum total charge and the actor stops cleanly at the cap.

### Related ActorForge actors

- [Image Converter & Compressor](https://apify.com/actor-forge/image-converter) — every format, resizing and compression
- [Images to PDF Converter](https://apify.com/actor-forge/images-to-pdf)
- [Bulk Image Downloader](https://apify.com/actor-forge/bulk-image-downloader)

### Changelog

- **2026-10-19** — Initial release: HEIC/HEIF to JPG (also WebP, PNG, PDF), primary image, upright orientation, P3 to sRGB, EXIF/GPS stripping, resize and ZIP.

***

*Built and maintained by **ActorForge**. Reliability first: every actor in the
portfolio is monitored by an automated nightly self-test, and breakages are
typically fixed the same day.*

# Actor input Schema

## `imageUrls` (type: `array`):

Direct links to HEIC/HEIF photos (iPhone, iPad, Samsung and other phones that save HEIF). JPEG, PNG, WebP, AVIF, GIF, TIFF and SVG links work too; the format is detected from the file itself. Up to 25 MB and 50 megapixels per image.

## `format` (type: `string`):

WebP is the best all-round choice for websites (about 25-35% smaller than JPEG). AVIF is smaller still but slower to encode. JPEG is the most compatible (e.g. for iPhone HEIC photos). PDF puts the images into a PDF document (see the PDF options below). 'Keep' re-compresses each image in its own format (SVG becomes PNG, HEIC becomes JPEG).

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

JPEG quality. 85 (default) keeps photos visually identical to the HEIC; 75 gives smaller files. For PNG, anything below 100 reduces the colour palette; 100 = lossless.

## `width` (type: `integer`):

Resize so the image is at most this wide. Empty = keep the original width. Images are never enlarged.

## `height` (type: `integer`):

Resize so the image is at most this tall. Empty = keep the original height.

## `fit` (type: `string`):

When both width and height are set: 'inside' keeps the aspect ratio within the box, 'cover' crops to fill the box exactly, 'contain' pads to the box with the background colour.

## `background` (type: `string`):

Hex colour used for padding ('contain') and for transparent areas when converting to JPEG.

## `stripMetadata` (type: `boolean`):

Remove EXIF, GPS location and camera details from the JPEGs (on by default, so you never share where a photo was taken). Each row still reports whether the original HEIC had EXIF / GPS. Turning this off keeps the colour profile; EXIF from HEIC files is not copied.

## `maxFileSizeKb` (type: `number`):

Optional. Lowers the quality step by step (and, if needed, the dimensions) until each image fits under this size. Rows show the quality used and whether the target was met.

## `keepAnimation` (type: `boolean`):

Animated GIF or WebP converted to WebP keep all frames. Off = first frame only. AVIF, JPEG and PNG output always use the first frame.

## `outputMode` (type: `string`):

'Links' saves each image with its own download link. 'ZIP' bundles all images into ZIP files (up to 200 MB each; links in the OUTPUT record). 'Both' does both. A merged PDF is always a download link.

## `filenamePattern` (type: `string`):

Tokens: {index} (00001…), {name} (original file name), {width}, {height}, {format}. The extension is added automatically; duplicate names get a -2, -3… suffix.

## `maxImages` (type: `integer`):

Stop after converting this many images.

## `pdfMode` (type: `string`):

'Merge' puts all images into one PDF, one image per page, in the order of your list. 'Separate' makes one PDF per image.

## `pdfPageSize` (type: `string`):

'Fit image' makes each page exactly the size of its image (96 dpi). A4 and Letter pages turn portrait or landscape to match each image, which is scaled to fill the page inside the margin.

## `pdfMarginMm` (type: `integer`):

White margin around the image on A4 and Letter pages. 'Fit image' pages have no margin.

## `pdfFileName` (type: `string`):

Name of the merged PDF (without .pdf). Very large merges are split into parts: name.pdf, name-part-2.pdf, ...

## Actor input object example

```json
{
  "imageUrls": [
    "https://raw.githubusercontent.com/strukturag/libheif/master/examples/example.heic",
    "https://raw.githubusercontent.com/tigranbs/test-heic-images/master/image3.heic"
  ],
  "format": "jpeg",
  "quality": 85,
  "fit": "inside",
  "background": "#ffffff",
  "stripMetadata": true,
  "keepAnimation": true,
  "outputMode": "links",
  "filenamePattern": "{index}-{name}",
  "maxImages": 1000,
  "pdfMode": "merge",
  "pdfPageSize": "fit",
  "pdfMarginMm": 10,
  "pdfFileName": "images"
}
```

# Actor output Schema

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

One row per converted image (or per merged PDF) with a download link, format, dimensions, bytes before and after and % saved.

## `summary` (type: `string`):

Totals (images converted, bytes before and after) and download links for ZIP and PDF 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 = {
    "imageUrls": [
        "https://raw.githubusercontent.com/strukturag/libheif/master/examples/example.heic",
        "https://raw.githubusercontent.com/tigranbs/test-heic-images/master/image3.heic"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("actor-forge/heic-to-jpg").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 = { "imageUrls": [
        "https://raw.githubusercontent.com/strukturag/libheif/master/examples/example.heic",
        "https://raw.githubusercontent.com/tigranbs/test-heic-images/master/image3.heic",
    ] }

# Run the Actor and wait for it to finish
run = client.actor("actor-forge/heic-to-jpg").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 '{
  "imageUrls": [
    "https://raw.githubusercontent.com/strukturag/libheif/master/examples/example.heic",
    "https://raw.githubusercontent.com/tigranbs/test-heic-images/master/image3.heic"
  ]
}' |
apify call actor-forge/heic-to-jpg --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,actor-forge/heic-to-jpg"
        }
    }
}
```

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/6ByqiVI0dCurHm4CE/builds/k6HQHcgpAZ5i5OX4P/openapi.json
