Crop PNG, JPG and WebP images online
Crop to an exact pixel width and height, keep PNG transparency, and download a new image. Processing stays in your browser without uploading your photo.
Drag files here
This tool processes one file at a time.
JPG, PNG, WEBP · Up to 30 MB per fileTry a precise square crop
Try without a personal file. The sample is an asymmetric colour grid, 640 × 320 pixels.


X: 160 · Y: 0 · Width: 320 · Height: 320
640 × 320 → 320 × 320 pixels. The middle half remains; both outer edges are removed.
Try these settings with the sample
- Download the sample and open it with Choose files in the tool above.
- X: 160 · Y: 0 · Width: 320 · Height: 320
- Process, compare the preview and dimensions, then download and reopen the result.
Turn an aspect ratio into crop coordinates
X is the distance from the left edge; Y is the distance from the top. All values are in pixels, starting at X=0, Y=0 in the top-left corner. Width and height describe the rectangle to keep, not its bottom-right coordinates. Use whole pixels and keep X + width ≤ source width and Y + height ≤ source height.
| Ratio | X | Y | Width | Height |
|---|---|---|---|---|
| 1:1 | 200 | 0 | 800 | 800 |
| 4:5 | 280 | 0 | 640 | 800 |
| 16:9 | 0 | 62 | 1200 | 675 |
For a centred rectangle, calculate X = (source width − crop width) ÷ 2 and Y = (source height − crop height) ÷ 2, then round down to whole pixels. The 16:9 example removes 62 pixels above and 63 below: an odd total margin puts the crop half a pixel away from the exact centre.
These coordinates change the framing without enlarging the remaining pixels. For example, an 800 × 800 crop does not meet a 1080 × 1080 requirement without a separate resize, and enlarging it cannot create new detail. Move X and Y within the bounds when the subject matters more than centring.
Keep the whole picture and change its dimensions: Resize image
Check before downloading
- Inputs are JPG, PNG and WebP; the result keeps the source format. PNG and WebP retain transparent areas. If a different format is required, convert the edited copy afterwards.
- The quality slider does not affect PNG. JPG and WebP are re-encoded at the selected quality, so file size and fine edges may change even at identical dimensions. There is no separate lossless WebP setting.
- Keep the original. The export is a new copy and does not copy the original EXIF, XMP or colour profile. Reopen it to check orientation, framing and transparency.
Format reference: WHATWG canvas export specificationexcludes PNG from the quality argument and allows quality values to be interpreted differently by implementations. The samples above illustrate pixel arrangement; they do not measure every browser's encoding.
Files are processed in this browser. Processing and privacy limits
These samples are free to use. The reference shows geometric results, not a guarantee of file size or compression quality.
Frequently asked questions
Can I enter an exact crop area?
Yes. Enter the X and Y position and the exact width and height in pixels.
How do I crop the centre or fix an out-of-bounds crop?
Subtract the crop width from the source width, divide by two and round down for X. Do the same with the heights for Y. X and Y must be zero or greater; the rectangle must not extend beyond either source edge. The coordinate table above gives checked examples for a 1200 × 800 image.
Can I crop a PNG without losing transparency?
Yes. A cropped PNG stays a PNG, and transparent pixels inside the selected rectangle remain transparent. Download the PNG result rather than converting it to JPG.
Does cropping reduce quality?
Cropping keeps the selected pixel dimensions without enlargement, but removes the outside area. JPG and WebP export also re-encodes the pixels and can change fine details. PNG avoids that additional lossy encoding step.
Can I undo a crop?
The downloaded file is a new copy. Keep the original source and process it again with different values when needed.
File choices, tested with real outputs
We made the source files, measured the exported bytes, and published the results so you can check them yourself.