Skip to content
UniKit

Batch ratio crop

Select several images at once and crop each to the largest area matching a target ratio (1:1, 16:9, custom), optionally scale them all to one width; a single image downloads as PNG and a batch is packed into one zip.

Runs in your browserEvery computation happens in your browser — your data never leaves this device.

Images are processed locally in your browser with Canvas and never uploaded.

Enter a ratio such as 16:9 or 4/3, or a plain number (width ÷ height).

Leave blank to keep the cropped size; filling it scales the result and derives the height.

Pick one or more images first (PNG / JPEG / WebP / GIF all work).

Result details

Result details

Pick images and the ratio-clipped preview shows up immediately; a batch is packed into one zip.

What this tool does

  • Bring a batch of differently sized images to one ratio: crop everything to 1:1 for an avatar wall, or to 16:9 for video covers.
  • Process dozens of files at once: multi-select, pick one ratio and one output width, and download a single zip whose entries carry the ratio and index.
  • Control the crop position precisely: besides centring you can pick any of the nine anchors so the subject is never cut off.
  • Different from the batch cropper: that one takes exact dimensions (which can distort or pad with transparency), this one only constrains the ratio — no distortion, no padding.

Example

Input

An 8×4 image with a 1:1 target ratio (centred)

Output

4×4 starting at (2, 0), 16 pixels clipped, guaranteed to differ from the source pixels

From the pure clipToRatio logic: cropWidth = min(8, round(4 × 1)) = 4 and cropX = floor((8−4)/2) = 2. With an output width of 2 the result is scaled again to 2×2.

Frequently asked questions

How do I write the ratio?

Use 16:9 or 4/3 style, or a plain number (width ÷ height, e.g. 1.5). Blank means 1:1, and anything unparsable or outside 0–100 reports an invalid ratio.

Will it stretch or pad the image?

No. Only the excess area is cropped away and pixels are copied as-is — no distortion and no transparent padding, which is the key difference from the batch cropper.

What does "output width" do?

If you also want a uniform size after cropping (e.g. every cover 1280 px wide), fill it in: the height is derived from the ratio and area averaging is applied. Leave it blank to keep the cropped size.

How are several images downloaded?

A single image downloads as PNG; a batch is packed into one zip whose entries look like photo-ratio100-1.png (ratio percentage plus index), so extracting them keeps the order.

Are my images uploaded?

No. Pixels are read through the canvas and cropped, zipped and downloaded entirely in the browser; there is no upload endpoint on the page.

Keywords:batch ratio crop

Related tools