What does the HEIC to JPG Converter do?
The HEIC to JPG Converter transforms Apple High Efficiency Image Container (.heic / .heif) photos into standard, universally compatible JPEG raster images (.jpg / .jpeg). It processes binary camera raw data, extracts intrinsic ISOBMFF metadata (ispe dimensions, container brands), applies resolution multipliers (1x, 2x, 3x, 4x) or custom pixel dimensions, controls JPEG lossy compression levels, and produces compliant JPEG Base64 Data URIs and downloadable binary files.
HEIC (High Efficiency Video Coding encapsulation) offers superior compression efficiency for mobile sensors but suffers from fragmented operating system compatibility, missing browser support on older platforms, and rejection by legacy content management systems (CMS) and machine learning pipelines. Converting HEIC to JPEG provides immediate interoperability across all modern web browsers, desktop operating systems, email clients, and cloud storage providers.
Core Concepts of HEIC and JPEG Formats
Understanding the architectural differences between HEIC and JPEG containers helps optimize compression and dimensions during conversion:
- Container Architecture: HEIC uses the ISO Base Media File Format (ISOBMFF, ISO/IEC 14496-12) containing an
ftypbrand box,metaitem locations, andispe(Image Spatial Extents) property descriptors. JPEG uses discrete JFIF/EXIF markers (0xFFD8SOI,0xFFE0APP0,0xFFC0SOF0,0xFFD9EOI). - Color Subsampling & Compression: HEIC utilizes HEVC (H.265) intra-frame prediction with 8-bit or 10-bit color depth. JPEG uses discrete cosine transforms (DCT) with 8-bit YCbCr color spaces and 4:2:0 or 4:4:4 chroma subsampling.
- Background Fill: HEIC containers support auxiliary alpha transparency maps. Because the standard JPEG specification does not support alpha channels, transparent regions are composited over a solid matte color (default
#FFFFFF). - Resolution Scaling: Downsampling or upscaling adjusts pixel density across 1x (standard), 2x (Retina HD), 3x (Ultra HD), and 4x (print ready) multipliers.
How to use the tool?
- Upload or Paste Input: Drag and drop an iPhone/iPad
.heicor.heifphoto into the upload drop zone, browse for a local file, or paste a Base64-encoded Data URI (data:image/heic;base64,...). - Set Resolution Scale: Select 1x (Original Dimensions), 2x (@2x Retina HD), 3x (@3x Ultra HD), or 4x (@4x Print Quality), or input exact custom
Width (px)andHeight (px)values. - Configure JPG Quality: Choose a compression preset from 95% (Maximum Fidelity), 90% (High Quality), 80% (Balanced), or 70% (Compact Web).
- Choose Background Matte: Select a background color fill using the interactive palette picker or input a hex color code (
#FFFFFF,#000000, etc.) to fill transparent areas. - Convert & Export: Click Convert to JPG. Inspect the rendered image preview and click Download to save the
.jpgfile or click Copy / Copy Data URI to copy the Base64 payload.
Related Developer Utilities
- HEIC to PNG Converter: Convert Apple HEIC/HEIF camera photos into lossless PNG raster images with alpha channel preservation.
- PNG to JPG Converter: Convert Portable Network Graphics (PNG) images to compact JPEG format with custom background matte fills.
- WebP to JPG Converter: Convert modern Google WebP images into standard JPEG format with adjustable compression quality.
- Base64 to Image Converter: Decode Base64 image strings into interactive visual previews and downloadable image files.
REST API Integration
Blueutils provides a free REST API endpoint (POST https://blueutils.com/api/image/heic-to-jpg) for programmatic integration.
API Request Parameters
| Name | Type | Description | Example |
|---|---|---|---|
rawText |
String | Raw Base64 string or Data URI of the HEIC/HEIF image payload. | "data:image/heic;base64,AAAAGGZ0eXBo..." |
options.scale |
Number | Resolution multiplier between 0.1 and 10. Default is 1. |
2 |
options.quality |
Number | JPEG compression quality factor between 0.1 and 1.0. Default is 0.92. |
0.90 |
options.backgroundColor |
String | Hex color string used to composite transparent areas. Default is "#FFFFFF". |
"#FFFFFF" |
options.width |
Number | Explicit output pixel width overriding scale multiplier. | 1920 |
options.height |
Number | Explicit output pixel height overriding scale multiplier. | 1080 |
API Request Payload Examples
cURL
curl -X POST https://blueutils.com/api/image/heic-to-jpg \
-H "Content-Type: application/json" \
-d '{
"rawText": "data:image/heic;base64,AAAAGGZ0eXBoZWljAAAAAG1pZjFoZWljAAAAFGlzcGUAAAAAAAADIAAAAlg=",
"options": {
"scale": 1,
"quality": 0.90,
"backgroundColor": "#FFFFFF"
}
}'Python
import requests
url = "https://blueutils.com/api/image/heic-to-jpg"
payload = {
"rawText": "data:image/heic;base64,AAAAGGZ0eXBoZWljAAAAAG1pZjFoZWljAAAAFGlzcGUAAAAAAAADIAAAAlg=",
"options": {
"scale": 1,
"quality": 0.90,
"backgroundColor": "#FFFFFF"
}
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.json())Java
import java.net.URI;
import java.net.http.HttpClient;
import java.net.http.HttpRequest;
import java.net.http.HttpResponse;
public class Main {
public static void main(String[] args) throws Exception {
String jsonPayload = """
{
"rawText": "data:image/heic;base64,AAAAGGZ0eXBoZWljAAAAAG1pZjFoZWljAAAAFGlzcGUAAAAAAAADIAAAAlg=",
"options": {
"scale": 1,
"quality": 0.90,
"backgroundColor": "#FFFFFF"
}
}
""";
HttpClient client = HttpClient.newHttpClient();
HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://blueutils.com/api/image/heic-to-jpg"))
.header("Content-Type", "application/json")
.POST(HttpRequest.BodyPublishers.ofString(jsonPayload))
.build();
HttpResponse<String> response = client.send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
}
}API Response Parameters
| Name | Type | Description | Example |
|---|---|---|---|
isValid |
Boolean | Indicates whether the conversion operation succeeded. | true |
mimeType |
String | MIME type of the converted raster image output. | "image/jpeg" |
originalFormat |
String | Detected container format of the source image. | "image/heic" |
dataUri |
String | Base64-encoded Data URI of the converted JPEG image. | "data:image/jpeg;base64,..." |
base64 |
String | Raw Base64 string payload of the image. | "AAAAGGZ0eXBo..." |
metadata.originalWidth |
Number | Intrinsic pixel width extracted from HEIC container. | 800 |
metadata.originalHeight |
Number | Intrinsic pixel height extracted from HEIC container. | 600 |
metadata.targetWidth |
Number | Rendered output pixel width after scaling. | 800 |
metadata.targetHeight |
Number | Rendered output pixel height after scaling. | 600 |
metadata.scale |
Number | Scaling multiplier applied to the image. | 1 |
metadata.quality |
Number | Compression quality factor applied to JPEG encoding. | 0.9 |
metadata.backgroundColor |
String | Solid background color fill used for transparent areas. | "#FFFFFF" |
metadata.majorBrand |
String | Primary ISOBMFF brand identifier of the source file. | "heic" |
metadata.aspectRatio |
Number | Aspect ratio (width / height) calculated for the image. | 1.3333 |
metadata.originalSizeBytes |
Number | Byte size of the source image binary payload. | 44 |
metadata.formattedSize |
String | Human-readable formatted file size. | "44 B" |
snippets.html |
String | HTML <img> tag ready for web embedding. |
"<img src=\"...\" width=\"800\" height=\"600\" alt=\"Converted JPG Image\" />" |
snippets.css |
String | CSS background-image declaration for styling. |
"background-image: url(\"...\");" |
snippets.markdown |
String | Markdown image embed tag. | "" |
API Response Payload Examples
Success Response (HTTP 200 OK)
{
"isValid": true,
"mimeType": "image/jpeg",
"originalFormat": "image/heic",
"dataUri": "data:image/jpeg;base64,AAAAGGZ0eXBo...",
"base64": "AAAAGGZ0eXBo...",
"metadata": {
"originalWidth": 800,
"originalHeight": 600,
"targetWidth": 800,
"targetHeight": 600,
"scale": 1,
"quality": 0.9,
"backgroundColor": "#FFFFFF",
"majorBrand": "heic",
"aspectRatio": 1.3333,
"originalSizeBytes": 44,
"formattedSize": "44 B"
},
"snippets": {
"html": "<img src=\"data:image/jpeg;base64,...\" width=\"800\" height=\"600\" alt=\"Converted JPG Image\" />",
"css": "background-image: url(\"data:image/jpeg;base64,...\");",
"markdown": ""
}
}Validation Failure Response (HTTP 400 Bad Request)
{
"isValid": false,
"error": "HEIC/HEIF image payload cannot be empty. Please upload a HEIC photo or provide a Base64 string."
}Rate Limit Exceeded Response (HTTP 429 Too Many Requests)
{
"error": "API rate limit exceeded. Please wait or contact support@blueutils.com."
}Why use an API to convert HEIC to JPG?
Integrating the HEIC to JPG Converter API into CI/CD pipelines, DevOps scripts, or automated agent workflows provides several practical advantages:
- Automated Mobile Upload Ingestion: Mobile clients uploading camera captures can be normalized to standard JPEG format before database persistence or cloud CDN caching.
- Microservice Decoupling: Offloads image parsing and dimension calculations to dedicated stateless processing services without installing system-level C/C++ image libraries.
- Deterministic Dimension Normalization: Generates uniform image dimensions, scaled previews, and metadata payloads for media libraries and AI vision models.
Native Usage
You can convert HEIC/HEIF images to JPEG locally across major operating systems and runtimes using standard built-in tooling without external library installations.
Windows (PowerShell)
On Windows 10/11 with the Windows Imaging Component (WIC) / HEIF Image Extension:
Add-Type -AssemblyName System.Drawing
function Convert-HeicToJpg {
param (
[Parameter(Mandatory=$true)][string]$InputPath,
[Parameter(Mandatory=$true)][string]$OutputPath,
[long]$Quality = 90
)
$image = [System.Drawing.Image]::FromFile($InputPath)
$encoder = [System.Drawing.Imaging.ImageCodecInfo]::GetImageEncoders() | Where-Object { $_.FormatDescription -eq 'JPEG' }
$encoderParams = New-Object System.Drawing.Imaging.EncoderParameters(1)
$encoderParams.Param[0] = New-Object System.Drawing.Imaging.EncoderParameter([System.Drawing.Imaging.Encoder]::Quality, $Quality)
$image.Save($OutputPath, $encoder, $encoderParams)
$image.Dispose()
Write-Host "Successfully converted $InputPath to $OutputPath"
}
# Usage:
# Convert-HeicToJpg -InputPath "photo.heic" -OutputPath "photo.jpg" -Quality 90Linux / Unix (Bash using ImageMagick / libheif)
On Linux systems using native CLI utilities (heif-convert from libheif-examples or magick):
# Using native libheif CLI:
heif-convert -q 90 input.heic output.jpg
# Or using ImageMagick:
magick convert input.heic -quality 90 output.jpgPython (Standard Library + Built-in Modules)
Using Python standard library tools to inspect ISOBMFF HEIC container headers and extract image dimensions:
import struct
def parse_heic_dimensions(file_path):
with open(file_path, "rb") as f:
data = f.read()
# Verify ISOBMFF ftyp header
if len(data) < 16 or data[4:8] != b"ftyp":
raise ValueError("Not a valid ISOBMFF container")
major_brand = data[8:12].decode("ascii", errors="ignore")
print(f"Container brand: {major_brand}")
# Search for 'ispe' (Image Spatial Extents) box
for i in range(len(data) - 16):
if data[i:i+4] == b"ispe":
width, height = struct.unpack(">II", data[i+8:i+16])
return {"width": width, "height": height, "brand": major_brand}
return {"width": 800, "height": 600, "brand": major_brand}
# Usage:
# dims = parse_heic_dimensions("photo.heic")
# print(f"Dimensions: {dims['width']}x{dims['height']} ({dims['brand']})")Java (Standard Library / ImageIO)
Using Java standard library buffers to inspect HEIC ISOBMFF container headers:
import java.io.File;
import java.io.FileInputStream;
import java.io.IOException;
import java.nio.ByteBuffer;
public class HeicMetadataParser {
public static void main(String[] args) throws IOException {
File file = new File("photo.heic");
if (!file.exists()) return;
try (FileInputStream fis = new FileInputStream(file)) {
byte[] buffer = new byte[(int) Math.min(file.length(), 65536)];
int bytesRead = fis.read(buffer);
if (bytesRead >= 12) {
String ftyp = new String(buffer, 4, 4, "ASCII");
String brand = new String(buffer, 8, 4, "ASCII");
if ("ftyp".equals(ftyp)) {
System.out.println("Valid ISOBMFF container detected. Brand: " + brand);
}
}
}
}
}