conversion

Image Resizer & Cropper API Reference

Upload any image to resize it to exact pixel dimensions, crop a region, rotate by 90-degree increments, or flip horizontally/vertically. Supports PNG, JPEG, WebP, AVIF, GIF input. Outputs PNG, JPEG, or WebP. The browser UI uses Canvas API — no image leaves your device.

Endpoint

POST/api/image-resizer

Full URL: https://quickhelp.dev/api/image-resizer

Request

Content-Type: application/json. No authentication required for the anonymous free tier (30 req/min per IP).

FieldTypeRequiredDescription
imagestringYesBase64-encoded image (no data-URL prefix)
widthoptionalNoTarget width in pixels
heightoptionalNoTarget height in pixels
fitdefaultNoResize fit: 'inside' preserves aspect ratio within bounds; 'fill' stretches to exact size; 'cover' fills and crops
cropXoptionalNoCrop left offset in pixels
cropYoptionalNoCrop top offset in pixels
cropWidthoptionalNoCrop width in pixels
cropHeightoptionalNoCrop height in pixels
rotateoptionalNoClockwise rotation in degrees
flipHorizontaloptionalNoMirror left-right (flop)
flipVerticaloptionalNoMirror top-bottom (flip)
formatdefaultNoOutput image format
qualitydefaultNoQuality for JPEG/WebP (1–100)

Response

Returns application/json. On error, returns a JSON object with an error string field and an appropriate HTTP status code.

FieldTypeDescription
imagestringBase64-encoded output image
formatstring
widthnumber
heightnumber
originalWidthnumber
originalHeightnumber
sizeBytesnumber

Example

Resize to 400 wide, preserve aspect ratio

curl

curl -X POST https://quickhelp.dev/api/image-resizer \
  -H 'Content-Type: application/json' \
  -d '{"image":"<base64-image>","width":400,"fit":"inside","format":"png"}'

Request body

{
  "image": "<base64-image>",
  "width": 400,
  "fit": "inside",
  "format": "png"
}

Response

{
  "image": "<base64-png>",
  "format": "png",
  "width": 400,
  "height": 300,
  "originalWidth": 1200,
  "originalHeight": 900,
  "sizeBytes": 48230
}

Error codes

StatusMeaning
200Success — result in response body
400Bad request — invalid input; error field describes the problem
404Tool not found
429Rate limit exceeded (30 req/min anonymous, 300 req/min free key)
500Internal server error — transient; retry with exponential back-off

OpenAPI spec

The full OpenAPI 3.1 specification for all tools is available at /openapi.json. Import it into Postman, Insomnia, or any OpenAPI-compatible client to get all endpoints with schema validation automatically.

We use cookies to serve ads and measure traffic. Cookie policy · Privacy policy