Convert image format
Every pipeline eventually hits a format it doesn't understand: a designer hands over a TIFF, a CMS demands WebP, a legacy importer chokes on BMP. This endpoint takes one image in and hands back another, in the format your next system actually accepts, without you touching an image library or a server.
Run it online
Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.
The mismatch problem
Teams rarely control every format that arrives in their pipeline. Cameras still export TIFF, scanners still love BMP, older CMS platforms still expect GIF, and modern frontends increasingly demand WebP for speed. Rather than bundling a graphics library into every service that touches an upload, you send the file once to /image/convert and get back exactly the container format you asked for.
What happens after you call it
The request is accepted immediately and returns a task_id — conversion itself runs asynchronously so your calling service never blocks on image processing. When the job finishes, you're notified through a signed webhook, or you fetch the output from a signed link that stays valid for 24 hours. Either way, the original upload and the converted output are deleted once the retention window passes, and nothing is ever used to train models.
A short note on the formats themselves
JPG remains the default for photographs because its lossy compression suits continuous tones; PNG and GIF preserve exact pixels and support transparency or simple animation; BMP is the oldest of the group, a raw, uncompressed format still produced by some Windows tools; TIFF is the archival choice for print and scanning workflows; WebP is the newest, built for the web, and typically produces smaller files than JPG or PNG at comparable quality. Knowing which one your destination actually needs avoids a lot of wasted bandwidth.
Where it fits in automation
Because the call is a single POST with a predictable JSON response, it drops cleanly into upload handlers, batch migration scripts, or scheduled jobs that walk a media library and normalize everything to one target format. You describe the source and target formats in the request body; the task queue handles concurrency, retries failed conversions up to three times automatically, and never charges you for a task that ultimately fails.
Who reaches for this
It's built for the engineer who doesn't want image codecs as a dependency, the agency migrating a client's asset library overnight, and the SaaS product that accepts arbitrary uploads and must normalize them before storage or display.
What you can do with it
CMS ingestion pipeline
A publishing platform accepts uploads in whatever format a contributor's camera produced and converts everything to WebP before it ever reaches the content database.
Legacy asset migration
An agency inherits thousands of BMP and TIFF files from a client's old file server and batch-converts them to PNG ahead of a website relaunch.
Print-to-web handoff
A print shop's high-resolution TIFF proofs get converted to JPG automatically so the sales team can preview them in a browser without downloading gigabytes.
Cross-platform consistency
A mobile app backend normalizes photos from iOS and Android uploads into a single JPG format before running them through further processing.
FAQ
Which formats does the image format converter API support?
JPG, PNG, GIF, BMP, TIFF and WebP, in any direction between them.
Is there a free tier for image conversion?
There's no free tier — free tiers get abused and slow everyone down. Access runs on a prepaid ForHosting KIT balance: top up from $10.00 (it never expires) and each request is charged at its published price, so a call with no balance returns HTTP 402. No subscription, no tokens, no invented credits, and a failed task is never charged.
How much does converting an image cost?
$0.002 per request plus $0.005 per image, billed only for tasks that actually complete.
Is the conversion synchronous?
No, it's asynchronous. You get a task_id immediately and the result arrives via signed webhook or a signed link valid for 24 hours.
What happens if a conversion fails?
The system retries automatically up to three times; if it still fails, you get a clear error and you are never charged for that task.
Can I convert transparent PNGs to JPG?
Yes, though JPG has no alpha channel, so transparent areas are flattened; if you need to keep transparency, convert to PNG or WebP instead.
Is there a bulk option for converting many images at once?
You call the endpoint per image, but nothing stops you from firing many requests concurrently or scripting a batch job against the API — the queue is built to handle volume.
How long is the converted file available for download?
The signed download link is valid for 24 hours, after which the file is deleted from our systems along with the original upload.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/image/convert \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"image":"https://ejemplo.com/imagen.jpg"}'const res = await fetch("https://api.kit.forhosting.com/image/convert", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"image": "https://ejemplo.com/imagen.jpg"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/image/convert",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"image": "https://ejemplo.com/imagen.jpg"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/image/convert", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"image":"https://ejemplo.com/imagen.jpg"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"image":"https://ejemplo.com/imagen.jpg"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/image/convert", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"image": "https://ejemplo.com/imagen.jpg"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "image.convert",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_mb | 15 |
max_megapixels | 12 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |