Crop an Image by Pixel Coordinates
Crop a browser-readable JPG, PNG, WebP, or GIF static bitmap with an explicit X, Y, width, and height, then verify the returned output type.
Select one source image, define a rectangle inside its pixel bounds, preview the exact sample, and download only after checking composition, dimensions, and MIME. The crop handler runs with browser image and Canvas APIs.
Browser-local image processing
Image Cropper
Crop preview
Choose a JPG, PNG, WebP, or GIF that this browser can decode, then set the crop area. Animation becomes the single static bitmap exposed by the browser. Source and crop dimensions must each be 1–16384 pixels.
How to use
Finish in three steps
- 01
Choose a file this browser can decode. Source width and height must each be between 1 and 16384 pixels.
- 02
Enter X and Y for the top-left corner plus crop width and height. Verify that X + width and Y + height do not exceed the source dimensions.
- 03
Select PNG, JPEG, or WebP, generate the crop, and inspect the preview, MIME, dimensions, edge content, transparency, and file size before download.
Worked example: centered 1600-pixel square
A 2400 × 1600 landscape has a shorter side of 1600. A centered square starts at X = (2400 − 1600) ÷ 2 = 400 and Y = 0. Enter 1600 for both sides; the preview should keep 400 pixels outside each horizontal edge and remove none vertically.
Boundary failures are coordinate failures
X and Y cannot be negative. Width and height must be positive, at most 16384, and the full rectangle must remain inside the source. A 1200-pixel-wide source rejects X 900 with width 400 because the right edge would be 1300.
Preview, output, and stale downloads
Coordinate edits redraw the preview from the selected source. Any coordinate, format, or quality change invalidates the previous download. The tool refuses to label a file as JPEG or WebP when Canvas returns a different Blob MIME.
Properties that need separate verification
Cropping removes pixels outside the rectangle but does not guarantee animation, metadata, EXIF, ICC profile, transparency, or exact encoded bytes. JPEG cannot carry alpha. Browser decode, Canvas limits, memory, and encoding behavior vary, so retain the source file.
Local handler boundary
The AIGClub crop handler uses an object URL, an in-memory Image and Canvas, a Blob, and a download link; it has no application upload call. Other page resources, browser extensions, device software, synced folders, and later sharing are outside that statement.
FAQ
About this tool
How do I diagnose an out-of-bounds crop?
Calculate the right edge as X + width and the bottom edge as Y + height. Each must be no larger than the source width or height.
Why does a square crop not center the face?
The geometric center only balances pixels. Move X or Y to frame the subject, then inspect the destination mask before export.
Does changing the output format keep the old download valid?
No. Format or quality changes hide the old link; generate and verify a new Blob.
Will the crop preserve an animated GIF?
No such guarantee is made. Canvas operates on the single static bitmap supplied by the browser, so keep the original animation.
Further reading
Related articles
Keep exploring
Related tools
Last updated: