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 re-encodes JPEG input as lossless PNG on libvips through Sharp, so a typical phone-camera photo converts in well under a second. `compressionLevel` takes 0-9 and trades encoding time for file size, and adaptive row filtering is always on because it cuts photographic PNGs down substantially at any level — it is not a switch you can turn off. `palette=true` quantises to an indexed 256-colour PNG, which is a large win on flat graphics and screenshots and a bad idea on photographs, where it bands smooth gradients. `progressive=true` writes an interlaced PNG. Be clear-eyed about what this conversion is for: PNG is lossless, so it cannot undo the JPEG artefacts already baked into the source, and the output will usually be several times larger than the JPEG you started with. It is the right move when you need a lossless intermediate for further editing, a format a tool insists on, or an image you are about to composite; it is the wrong move if you are trying to save bytes.
There is no background removal, alpha injection or colour-space override on this endpoint — those are not parameters the request schema accepts.
Supported formats
Source formats (2)
- jpg
- jpeg
Target formats (1)
- png
Quick start
Every sample posts the job, then polls /v1/status/{jobId} until it finishes, with your API key in the X-Api-Key header. The parameter names below are the ones the endpoint actually accepts — anything else is dropped rather than rejected.
curl -X POST https://api.convertintomp4.com/v1/convert \
-H "X-Api-Key: ck_your_api_key" \
-F "file=@input.jpg" \
-F "targetFormat=png"
-F "compressionLevel=9" \
-F "palette=true"import { readFileSync } from "node:fs";
import { ConvertIntoMP4Client } from "convertintomp4";
const apiKey = process.env.CIM4_API_KEY;
const client = new ConvertIntoMP4Client({ apiKey });
// Presigned direct-to-R2 upload, then queue the conversion.
const { jobId } = await client.uploadDirect(
readFileSync("input.jpg"),
"input.jpg",
"application/octet-stream",
{ targetFormat: "png" },
);
// Poll until the job reaches a terminal state.
let job;
do {
await new Promise((r) => setTimeout(r, 2000));
job = await fetch(`https://api.convertintomp4.com/v1/status/${jobId}`, {
headers: { "X-Api-Key": apiKey },
}).then((r) => r.json());
} while (job.status !== "completed" && job.status !== "failed");
console.log("Download URL:", job.result?.downloadUrl);import time, requests
from convertintomp4 import Client
api_key = "ck_your_api_key"
client = Client(api_key=api_key)
# Presigned direct-to-R2 upload, then queue the conversion.
with open("input.jpg", "rb") as f:
job = client.upload_direct(
f, "input.jpg", "application/octet-stream", "png"
)
# Poll until the job reaches a terminal state.
while True:
status = requests.get(
f"https://api.convertintomp4.com/v1/status/{job['jobId']}",
headers={"X-Api-Key": api_key},
).json()
if status["status"] in ("completed", "failed"):
break
time.sleep(2)
print("Download URL:", status.get("result", {}).get("downloadUrl"))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?
No. There is no background-removal parameter on the conversion API — `removeBackground` would be dropped from the request rather than rejected, and you would get a normal opaque PNG back. JPEG has no alpha channel to begin with, so a converted PNG starts fully opaque. Background knockout needs a dedicated tool.
What does adaptiveFiltering do?
PNG's zlib compression has five per-row filter strategies (none, sub, up, average, paeth), and adaptive filtering picks the best one per row instead of using a fixed choice. It makes a large difference on photographic content, which is why it is always enabled and not exposed as a parameter — `adaptiveFiltering` is not a field the API accepts. Use `compressionLevel` if you want to trade encoding time against size.
How is metadata handled across JPG to PNG?
EXIF orientation is applied to the pixel data so the image is the right way up, and the metadata block does not carry over — PNG has no native EXIF container, and the API does not write XMP into iTXt chunks. There is no `keepMetadata` parameter. If you need the camera data, read it from the JPEG before converting and store it yourself.
What if the JPG is in CMYK color space?
CMYK JPEGs come out as RGB, because PNG has no practical CMYK support. There is no `colorSpace` parameter to override that on the image pipeline. If you need to stay in CMYK, convert to TIFF instead — that is the format that actually carries it.
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. pdf2docx layout reconstruction, automatic OCR pre-pass on scans, LibreOffice 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.