JPG to PNG API — Free Tier + Pay-As-You-Go
Convert JPG to PNG with optional transparency, lossless compression, and EXIF preservation via API. Sharp-backed.
What it does
The JPG to PNG API converts JPEG inputs to PNG outputs with optional alpha-channel addition (via `addAlpha=true`), background-color removal for studio-shot product photos (`removeBackground=color:white,tolerance:20`), and lossless PNG compression at the maximum compression level by default. Outputs preserve original ICC color profiles and EXIF orientation. The pipeline runs on libvips through Sharp; typical phone-camera JPEGs convert in under 400 ms.
PNG compression level is configurable 0-9 (default 9, maximum compression); higher levels are slower but produce smaller files. Adaptive filtering (zlib's adaptive-row-filter selection) is enabled by default — this produces ~15% smaller PNGs at the cost of ~30% encoding time, important for the common case of converting product photography for retail catalogues. The API also exposes `interlaced=true` for Adam7 interlacing (slower decode, useful for progressive web display), `palette=true` for indexed-color PNG output (8× smaller for low-color images), and `pngCompressionStrategy=` for advanced zlib tuning.
Supported formats
Source formats (2)
- jpg
- jpeg
Target formats (1)
- png
Quick start
All three SDK languages show the same conversion: a single POST to /v1/convert with your API key in the X-Api-Key header.
curl -X POST https://api.convertintomp4.com/v1/convert \
-H "X-Api-Key: ck_your_api_key" \
-F "file=@input.jpg" \
-F "target=png"
-F "compressionLevel=9" \
-F "adaptiveFiltering=true"import { ConvertIntoMP4 } from "@convertintomp4/sdk";
import fs from "node:fs";
const client = new ConvertIntoMP4({ apiKey: process.env.CIM4_API_KEY });
const job = await client.convert({
file: fs.createReadStream("input.jpg"),
target: "png",
});
const result = await client.waitForJob(job.id);
console.log("Output URL:", result.outputUrl);from convertintomp4 import Client
client = Client(api_key="ck_your_api_key")
with open("input.jpg", "rb") as f:
job = client.convert(file=f, target="png")
result = client.wait_for_job(job.id)
print("Output URL:", result.output_url)Features
- Lossless PNG output at configurable compression
- Optional alpha channel addition
- Background-color removal for product photos
- EXIF orientation preservation
- ICC profile preservation
- Adam7 interlacing for progressive display
- Indexed-color palette mode for low-color images
Pricing
From $9.99/mo (Pro) or $24.99/mo (Business) — or pay-as-you-go on the API plan.
Free tier: 5 conversions/day, 100 MB file size, no API key required (IP-gated). Pro $9.99/mo: 100/day (2,000/month), 2 GB files. Business $24.99/mo: 1,000/day (20,000/month), 10 GB files, GPU encoding, dedicated support.
See full pricing breakdown →Built for production
99.9% uptime SLA
Multi-region failover, transparent status page, 60-second response-time guarantee on Business.
Encryption + auto-delete
TLS 1.2+ in transit, AES-256 at rest. Files deleted after 1h / 24h / 7d depending on plan, or instantly via DELETE endpoint. See the security page.
~7s median latency
Most sub-100 MB jobs complete in 6-9 seconds. Webhook-driven async for heavier workloads; waitForJob for synchronous flows.
Frequently Asked Questions
Will the PNG be larger than the JPG?
Yes — typically 4-8× larger. JPEG uses lossy compression optimised for photos; PNG is lossless, so a photo PNG carries every pixel exactly. PNG only wins on size for graphics with flat colors, transparency, or text. Use WebP or AVIF if you want lossless + photo-grade compression.
Can I add transparency to a JPG when converting to PNG?
Yes. Pass `removeBackground=color:white,tolerance:20` and pixels within 20 units of white become transparent in the PNG output. Useful for converting product photography shot against a uniform backdrop into transparent assets for catalogue layouts.
What does adaptiveFiltering do?
PNG's zlib compression has 5 per-row filter strategies (none, sub, up, average, paeth). Adaptive filtering picks the optimal filter per row, producing ~15% smaller files at ~30% encoding-time cost. Default is on — pass `adaptiveFiltering=false` for faster but larger output.
How is metadata handled across JPG to PNG?
EXIF orientation is applied to the pixel data and the EXIF block is stripped (PNG doesn't have native EXIF support, although the iTXt chunk can carry it). ICC color profiles convert losslessly. Pass `keepMetadata=true` to embed XMP-encoded metadata in iTXt chunks.
What if the JPG is in CMYK color space?
CMYK JPGs convert to sRGB by default (PNG doesn't support CMYK in practice). Pass `colorSpace=cmyk` to preserve CMYK in the output's ICC profile, although browser support for CMYK PNG is essentially zero — use TIFF for true CMYK delivery.
Related APIs
- MP4 to MP3 APIExtract MP3 audio from MP4 video programmatically. Per-job bitrate and sample rate, ID3 tag injection, fast remux mode.
- PDF to JPG APIRender PDF pages to JPG images programmatically. Per-page DPI, page-range selection, batch ZIP output, ImageMagick + pdftoppm pipeline.
- MP4 to GIF APIConvert MP4 video to animated GIF programmatically. Per-job width, fps, palette mode, and start/end trim controls.
- PDF to DOCX APIConvert PDF to editable Word DOCX via API. Preserves layout, fonts, tables, and images. pdf2docx + OCR fallback.
- DOCX to PDF APIConvert Word DOCX to PDF programmatically. LibreOffice-rendered with font fallback, headers/footers, and PDF/A archival output.
- HEIC to JPG APIConvert iPhone HEIC and HEIF photos to JPG via API. EXIF rotation, ICC profile, Live Photo frame selection.
Or browse the full catalogue of 23 API products →
Get an API key
Start integrating the JPG to PNG API in five minutes. Read the docs, grab a key, and ship your first conversion before the trial coffee cools.