Crop Image

Select part of a JPEG, PNG, WebP, AVIF, GIF, BMP, ICO, or HEIC image in pixels or as a percentage of that picture. The crop is drawn in your browser.

Use this tool

Drop a file here, or use the picker. The file type is checked from its contents.

Crop

Result

The result appears in this panel after you run the tool.

About this tool

The crop rectangle is measured in the image’s own pixels, not in screen pixels. Dragging on the canvas maps the pointer back to that pixel grid, including on a phone. The number fields do the same job from the keyboard. A crop that starts outside the image, or that is smaller than one pixel, is rejected. The page does not quietly clamp it.

Percentage mode measures the rectangle as a share of the picture. Left 10, top 10, width 80, and height 80 keeps the center on a 400 pixel snapshot and on a 4000 pixel export. Dragging still maps the pointer onto the picture, and the fields show those shares. Each edge is rounded to a whole pixel and kept inside the bitmap. A share that rounds to nothing becomes one pixel. Switching between Dimensions and Percentage keeps the rectangle you are looking at.

JPEG, PNG, WebP, AVIF, GIF, BMP, ICO, and HEIC are accepted only when the file bytes match that format. A mismatched filename is ignored. JPEG, PNG, and WebP stay in that format. AVIF stays AVIF only when this browser encodes AVIF; otherwise the file is PNG. A GIF keeps its first frame. HEIC is written back as PNG. Camera metadata such as EXIF is not copied, because the result is a new encoding.

Images larger than 250 MB or 40 million pixels are refused rather than scaled down. After a crop, resize, rotate, flip, grayscale, and compress are the usual next edits. A format change such as WebP is offered separately. Opening one of those tools keeps the cropped image in this browser. A refresh can discard it.

How to use it

  1. Choose an image or drop it on the tool. You can also arrive here from another image tool with the current image already loaded.
  2. Stay on Dimensions to type source pixels, or switch to Percentage and enter left, top, width, and height as shares of the picture.
  3. Drag a rectangle or edit the fields, then crop. The download uses the encoded format, such as cropped.jpg or cropped.png.

Limitations

A rectangle of source pixels, then a rebuilt file

Whole pixels, inside the bitmap

The crop is four integers: left, top, width, and height. Width and height must be at least one pixel. The rectangle has to lie completely inside the decoded bitmap. A box that starts at a legal left edge and then runs past the right edge is rejected. It is not clipped to the picture. Dragging on the preview converts the pointer into those source pixels. Typing the four fields does the same work. The page copies that rectangle onto a fresh canvas whose dimensions are exactly the width and height you asked for. Everything outside the box is discarded. Everything inside is the sample the browser already decoded.

Percent mode stores the rectangle as four shares of the decoded bitmap rather than four pixel counts. A left of 10, a top of 10, a width of 80, and a height of 80 therefore selects the same relative window on every file in a batch. The page rounds each edge to a whole pixel. If rounding would step past the far edge, that edge is pulled back so the box still lies inside. A share that rounds to an empty span becomes a single pixel. Pixel mode is unchanged and still rejects a box that crosses the boundary instead of clipping it.

An animated GIF or an animated WebP contributes only the frame that became the bitmap. Later frames are not cropped one by one and stitched back into an animation. An ICO that holds several sizes contributes the largest entry this page could open. A HEIC file contributes the primary decoded bitmap, including a depth or extra image only insofar as that decode already folded it into those pixels.

What changes besides the crop

The pixels inside the rectangle are the crop. The container around them is new. JPEG, WebP, and AVIF downloads are encoded again from the canvas. The quality range on this page opens at 0.92. It is enabled for a JPEG write and a WebP write. It is enabled for an AVIF write only after a probe shows that two AVIF quality settings change the byte length of a test picture. PNG, GIF, BMP, ICO, and a HEIC photo handed back as PNG leave that range disabled, so no quality argument is sent. If this browser cannot write AVIF at all, preserve intent stores PNG instead.

A GIF rewrite also reduces color to a 256-entry palette and turns partial transparency into a single on-or-off index. A BMP rewrite is 24-bit and blends partial transparency onto white. Neither of those paths uses the quality range. EXIF that lived in the original JPEG is not copied, because the coefficients are new.

A second save is another encode

Cropping a JPEG to a smaller rectangle already quantizes the kept pixels. Opening that download here again, or on the compressor, quantizes them once more. The second pass can soften text and foliage even when the rectangle did not move. A PNG crop is a lossless container for the cropped samples, so a later PNG save does not add JPEG-style generation loss, though the file bytes will still differ from the source PNG. If you need the tightest crop of a JPEG, crop once, at the quality you actually want, rather than cropping at 0.92 and compressing again out of habit.

Privacy

Your file is processed in your browser and is not uploaded to UtilChain. The file name is not sent to analytics.