Crop an Image to an Aspect Ratio
Crop a photo to 1:1, 4:5, 3:2, 16:9 or 9:16 around a chosen anchor, and print the exact pixel rectangle it kept. Nothing is uploaded.
What this page does
Keeps the largest rectangle of a chosen shape from your picture and discards the rest. You name the ratio and an anchor, and the page computes the rectangle instead of asking you for coordinates.
How to use it
Choose a file, set the options and press Render. Example: a 1600 × 900 PNG cropped to 1:1 at the centre becomes a 900 × 900 PNG taken from x = 350 to 1250.
How it works
The kept rectangle is the largest one with the requested ratio that fits inside the source, then shifted to the anchor you chose. Pixels are copied straight from the decoded frame with no resampling, so an edge you see on screen is an edge in the file.
What it refuses
A ratio that is not two positive whole numbers, an anchor the page does not offer, or a crop that would be smaller than one pixel is refused by name.
Where it runs
The picture is decoded and redrawn on a canvas in this tab: there is no upload, no network request and no model, so the pixels never leave your device. It opens PNG, JPEG, WebP, GIF, BMP and AVIF up to 16,000,000 pixels (16 MP) and 25 MB per file; anything larger is refused with its measured size rather than drawn blank.
Keeps the largest rectangle of a chosen shape from your picture and discards the rest. You name the ratio and an anchor, and the page computes the rectangle instead of asking you for coordinates.
The kept rectangle is the largest one with the requested ratio that fits inside the source, then shifted to the anchor you chose. Pixels are copied straight from the decoded frame with no resampling, so an edge you see on screen is an edge in the file. The picture is decoded and redrawn on a canvas in this tab: there is no upload, no network request and no model, so the pixels never leave your device.
Worked example: a 1600 × 900 PNG cropped to 1:1 at the centre becomes a 900 × 900 PNG taken from x = 350 to 1250.
How to use the crop an image to an aspect ratio
Choose an image file, set the options, and press Render. The result appears below the form.
Example: a 1600 × 900 PNG cropped to 1:1 at the centre becomes a 900 × 900 PNG taken from x = 350 to 1250.
The picture is decoded and redrawn on a canvas in this tab: there is no upload, no network request and no model, so the pixels never leave your device.
- Aspect ratio — one of 1:1, 4:5, 3:2, 16:9, 9:16, 2:3, 3:4
- Keep this part — one of centre, top, bottom, left, right
- Output format — one of png, jpeg, webp
- Quality (JPEG and WebP) — 1 to 100
What the canvas draws
Keeps the largest rectangle of a chosen shape from your picture and discards the rest. You name the ratio and an anchor, and the page computes the rectangle instead of asking you for coordinates.
The kept rectangle is the largest one with the requested ratio that fits inside the source, then shifted to the anchor you chose. Pixels are copied straight from the decoded frame with no resampling, so an edge you see on screen is an edge in the file.
- Every option is declared by this page, so an unknown choice or an out-of-range number is refused by name before any pixel is drawn.
- The preview and the download are the same canvas: what you see is the file you get.
What it refuses, and what it leaves out
A ratio that is not two positive whole numbers, an anchor the page does not offer, or a crop that would be smaller than one pixel is refused by name.
It opens PNG, JPEG, WebP, GIF, BMP and AVIF up to 16,000,000 pixels (16 MP) and 25 MB per file; anything larger is refused with its measured size rather than drawn blank.
- Not the right page for: a crop you want to drag by hand, which is the free crop page
- Not the right page for: scaling the whole picture, which is the resize page
What to Expect
Best for
- turning a landscape photo into a square post
- removing the side bars from a screenshot before a 16:9 upload
- getting the exact pixels a platform will show
Not ideal for
- a crop you want to drag by hand, which is the free crop page
- scaling the whole picture, which is the resize page
What this tool keeps
- The source pixels, unscaled
- The exact rectangle, printed as x, y, width and height
- Transparency in PNG and WebP output
What may need cleanup
- Choosing an anchor other than the centre when the subject is off-centre
- Downscaling afterwards if the platform has a size limit
Common errors
- A ratio of 0 in either side is refused
- A picture narrower than the requested ratio still crops, just from the other axis
- A JPEG output flattens transparency onto white
Example use cases
- Squaring a product photo for a marketplace
- Making a 9:16 story from a landscape shot
Sample input
a 1600 × 900 PNG cropped to 1:1 at the centre
Sample output
a 900 × 900 PNG taken from x = 350 to 1250
Who this is for
- People posting to a platform with a fixed aspect ratio
- Designers checking the exact pixels a crop keeps
Frequently asked questions
Does my image get uploaded anywhere?
The picture is decoded and redrawn on a canvas in this tab: there is no upload, no network request and no model, so the pixels never leave your device.
What is the maximum image size?
It opens PNG, JPEG, WebP, GIF, BMP and AVIF up to 16,000,000 pixels (16 MP) and 25 MB per file; anything larger is refused with its measured size rather than drawn blank. The limit exists because a browser tab has to hold the decoded bitmap in memory.
What happens if the file cannot be decoded?
The page refuses it by name — unsupported type, decode failure, zero pixels, or above the pixel cap — and shows the measured size rather than drawing a blank canvas. The file you chose stays selected so you can correct one option and try again.
Is this the same as the free crop page?
No. The free crop page takes a pixel rectangle you type. This page takes a ratio and an anchor and computes the rectangle, then prints it so you can reuse the numbers.
Does cropping lower the quality?
Not here. The kept pixels are copied without scaling, so a PNG crop is lossless. Only the output encoder can change the bytes: JPEG and WebP are lossy at the quality you set.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.