API
Image conversion over HTTP
Overview
The Convert2WebP API lets you convert images between formats programmatically. Send a multipart request with your image and receive the converted file in the response body. All processing happens server-side with sub-second latency for most files.
Base URL
https://convert2webp.com/api/v1Authentication
No authentication is required. The API is free and open. All requests are rate-limited to 60 requests per minute per IP address.
Rate limiting
Rate limits are applied per IP address. All responses include rate limit headers.
| Limit | Max File Size | Max Batch Files |
|---|---|---|
| 60 requests / minute | 10 MB per file | 20 files per batch |
Rate limit headers are included in every response: X-RateLimit-Remaining, X-RateLimit-Reset.
Endpoints
Convert a single image to a target format. Accepts multipart/form-data with the image file and optional parameters.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| file | File | Required | The image file to convert. Accepts PNG, JPG, GIF, BMP, TIFF, SVG, AVIF, ICO, and WebP. |
| output_format | string | Optional | Target output format: webp, png, jpg, gif, bmp, or pdf.(default: webp) |
| quality | integer | Optional | Output quality from 1 (lowest) to 100 (highest).(default: 80) |
| width | integer | Optional | Max output width in pixels. Aspect ratio is preserved. |
| height | integer | Optional | Max output height in pixels. Aspect ratio is preserved. |
| strip_metadata | boolean | Optional | Strip EXIF/IPTC/XMP metadata from the output.(default: true) |
Responses
Code examples
curl -X POST https://convert2webp.com/api/v1/convert \
-F "file=@photo.png" \
-F "format=webp" \
-F "quality=80" \
-o converted.webpTry it
Convert multiple images in a single request. Returns a ZIP archive with all converted files.
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| files | File[] | Required | Array of image files to convert. Maximum 20 files per request. |
| format | string | Optional | Target output format applied to all files.(default: webp) |
| quality | integer | Optional | Output quality from 1 to 100.(default: 80) |
Responses
Code examples
curl -X POST https://convert2webp.com/api/v1/batch \
-F "files=@image1.png" \
-F "files=@image2.jpg" \
-F "files=@image3.gif" \
-F "format=webp" \
-F "quality=80" \
-o converted.zipList all supported input and output image formats.
Responses
Code examples
curl https://convert2webp.com/api/v1/formatsExample Response
{
"input": [
"png", "jpg", "jpeg", "gif", "bmp",
"tiff", "svg", "avif", "ico", "webp"
],
"output": ["webp", "png", "jpg", "gif", "bmp", "pdf"]
}Check service availability.
Responses
Code examples
curl https://convert2webp.com/api/v1/healthExample Response
{
"status": "ok",
"version": "1.0.0",
"timestamp": "2026-04-04T12:00:00.000Z"
}Error codes
All error responses return a JSON body with an error object describing what went wrong.
{
"error": {
"code": 429,
"message": "Rate limit exceeded. Please wait 30 seconds before retrying."
}
}| Code | Name | Description |
|---|---|---|
| 400 | Bad Request | The request was malformed. Check that all required parameters are present and valid. |
| 413 | Payload Too Large | The uploaded file exceeds the 10 MB limit. |
| 415 | Unsupported Media Type | The uploaded file format is not supported for conversion. |
| 429 | Too Many Requests | You have exceeded the rate limit (60 requests per minute). Wait and retry. |
| 500 | Internal Server Error | An unexpected error occurred. If this persists, contact convert2webp@deployvision.com. |