Image Cropper
Crop an image to a rectangle you specify.
In-depth guide
Image cropper: pixel coordinates and clamped rectangles
Set a numeric crop rectangle using top-left coordinates and understand clamping and large-image limits.
Key figures at a glance
- Initial x coordinate
- 0 pixels
- The initial y coordinate is also 0; sizes are filled from the loaded image.
- Default output
- PNG
- The fresh page offers PNG, JPEG and WebP.
- Default quality
- 92
- Used by JPEG/WebP encoding; PNG ignores this quality setting.
- Canvas area cap
- 16,777,216 pixels
- Large sources are reduced before processing; large resampling targets are capped too.
What this tool changes
This cropper uses numeric x, y, width and height controls, not draggable crop handles. The origin is the top-left of the oriented working image; x moves right and y moves down. For a very large source, the initial area cap is applied before these coordinates are used.
Coordinates and sizes are rounded to whole pixels. The rectangle is constrained inside the image, with at least one pixel in each dimension. An oversized or out-of-range request therefore yields a smaller valid crop rather than blank padding. Recheck x and y when loading another file: loading resets the size fields but does not reset those offsets.
Worked examples
The following examples use a 100 × 80 working image and the actual clamp function.
| Input or setting | Result |
|---|---|
| x=20, y=10, width=40, height=30 | x=20, y=10; 40 × 30 |
| x=80, y=60, width=50, height=50 | x=80, y=60; 20 × 20 |
| x=200, y=200, width=40, height=30 | x=99, y=79; 1 × 1 |
Use the controls
- Load the image and note that large sources may be reduced.
- Enter whole-pixel x/y offsets and the desired rectangle size.
- Check the preview and actual output dimensions after clamping.
- Choose a format and download; preserve the source if the removed area may be needed.
Output and limits
The tool decodes and processes one image locally in your browser without uploading it for conversion. Original camera, date, GPS and source colour-profile metadata are not copied. Animated input becomes a still image. Unsupported input depends on the browser's decoder.
PNG stores the resulting canvas pixels losslessly and keeps alpha. JPEG adds lossy encoding and composites transparent areas onto white. WebP normally keeps alpha with lossy colour encoding at the default quality. If WebP encoding is unsupported, the tool reports a PNG fallback and names the download .png. The preview is made before JPEG/WebP compression: inspect the downloaded file for compression artefacts.
Check the result dimensions, especially for large images. The source can be reduced to the 16,777,216-pixel area cap before the operation; a larger resampled result is capped again. The actual sizing function maps 8000 × 6000 to 4729 × 3547. A larger file or pixel count does not restore detail already lost.
For other changes, download the result and load it into the next tool; these pages do not maintain a combined edit history. Use the image converter for a different output format.
Frequently asked questions
Is my image uploaded anywhere?
No. The image is decoded and re-encoded entirely in your browser using a canvas. It never leaves your device, is never sent to a server, and nothing is stored.
Will the quality drop?
PNG keeps every pixel. BMP also keeps every pixel but flattens transparency onto white. WebP and JPEG are lossy at the default quality of 92, so the quality setting trades file size against fidelity. Decoding an already-lossy JPEG or WebP never brings back lost detail.
Why did my photo come out the right way up?
Photographs from phones store an EXIF orientation tag rather than rotating the pixels. This tool reads that tag and applies the rotation, so the result matches what you saw in your gallery.
Is there a size limit?
Very large images are scaled down to stay within 16,777,216 pixels (about 16.7 million), because some browsers, notably iOS Safari, produce a blank image beyond that. The tool applies the cap in every browser and does not warn you. The aspect ratio is kept.
Sources
- WHATWG — HTML canvas transformations, drawing and serialization
- W3C — PNG specification, third edition
- Google — WebP compression and alpha
This guide explains published rules in plain language. It is not financial, legal or official advice — rules change, so confirm with the agency linked above before you commit.