# HEIC to WEBP

Convert Apple HEIC/HEIF photos to WebP images.

<p><a href="/images/heic/heic-to-webp" style="color:rgb(230,0,6);font-weight:600;font-size:0.875rem;text-decoration:none">Try HEIC to WebP in the browser &rarr;</a></p>

Convert.FAST uses this same API — what you see in the browser is what you get in code.

## Quick reference

| | |
|---|---|
| **Job type** | `image.heic-to-webp` |
| **targetFormat** | `webp` |
| **Category** | images |
| **Input formats** | `.heic`, `.heif` |
| **Output extension** | `.webp` |
| **Costing** | 1 credit per 5 MB |
| **Max file size** | 1 GB |

## Example

<!-- code-tabs:start default=curl -->
### cURL
```bash
# 1) Submit
JOB_ID=$(curl -sS -X POST "https://api.tools.fast/convert" \
  -H "X-Fast-Api-Key: $API_KEY" \
  -F "file=@photo.heic" \
  -F "targetFormat=webp" | jq -r '.id')
# → 202 Accepted: {"id": "019e3a7b-...", "status": "Queued"}

# 2) Poll until terminal status
while true; do
  RESPONSE=$(curl -sS "https://api.tools.fast/convert/job/${JOB_ID}" \
    -H "X-Fast-Api-Key: $API_KEY")
  STATUS=$(echo "$RESPONSE" | jq -r '.status')
  [ "${STATUS}" = "Succeeded" ] && break
  [ "${STATUS}" = "Failed" ] || [ "${STATUS}" = "Canceled" ] && { echo "$RESPONSE" | jq; exit 1; }
  sleep 1
done

# 3) Download
curl -sS "https://api.tools.fast/convert/job/${JOB_ID}/download" \
  -H "X-Fast-Api-Key: $API_KEY" \
  -o "photo.webp"
# → Binary file (image/webp, 2.5 MB)
```
<!-- code-tabs:end -->


### With options

<!-- code-tabs:start default=curl -->
### cURL
```bash
JOB_ID=$(curl -sS -X POST "https://api.tools.fast/convert" \
  -H "X-Fast-Api-Key: $API_KEY" \
  -F "file=@photo.heic" \
  -F "targetFormat=webp" \
  -F 'options={"resize":{"enabled":false,"mode":"pixels","preset":"off","value":0}}' | jq -r '.id')
```
<!-- code-tabs:end -->

## Options

This converter supports the following options. See [Options Reference](../options.md) for full details.

| Option | Description | Default |
|--------|-------------|---------|
| [`resize`](../options.md#resize) | Resize image by pixels or percentage with presets (4K, 1080p, 720p, custom) | enabled: `false`, preset: `off` |
| [`smartCompression`](../options.md#smartcompression) | Optimize file size using format-specific compression (MozJPEG, pngquant, etc.) | enabled: `false` |
| [`metadata`](../options.md#metadata) | EXIF/GPS metadata handling for privacy and file size reduction | strip: `true` |

## Cost estimate

<!-- code-tabs:start default=curl -->
### cURL
```bash
curl -sS "https://api.tools.fast/convert/estimate/heic/webp?fileSizeMb=50"
```
<!-- code-tabs:end -->

## Related

- [HEIC to JPG](heic-to-jpg.md)
- [HEIC to PNG](heic-to-png.md)
- [HEIC to AVIF](heic-to-avif.md)
