Skip to content

Image Cropper

Crop a rectangle from an image and download a PNG. The page does not keep the file.

Result

Choose an image

How to Use

  1. 1 Choose an image up to 5 MB.
  2. 2 Type the crop rectangle.
  3. 3 Download cropped.png.

Example Output

  • A crop at 0, 0 with width 1 and height 1 is a one-pixel PNG.

About This Tool

X and Y are the top-left pixel. Width and height must stay inside the image. The download is cropped.png.

Using the Image Cropper

The Image Cropper copies a pixel rectangle from an image and encodes it as PNG. The file field is labeled Image and starts with no file. The X field starts at 0. The Y field starts at 0. The Width field starts at 1. The Height field starts at 1. Choose Crop the image. On a successful one-pixel crop at the top-left corner of a larger image, the label above the headline reads Crop and the headline is 1 by 1. The sentence is The crop starts at 0, 0 and is 1 by 1 pixels. The PNG is not stored.

The Width line is 1 and the Height line is 1 for that run. The download is named cropped.png, and the button reads Download cropped.png. The steps say to choose an image up to 5 MB, type the crop rectangle, and download cropped.png. The about line says X and Y are the top-left pixel, width and height must stay inside the image, and the download is cropped.png. The page does not keep the file.

Before you choose Crop the image, the headline reads Choose an image and the label reads Result. A missing file returns Choose a PNG, JPG, GIF, WebP, BMP, or AVIF image up to 5 MB. If X plus width or Y plus height would extend past the image edge, the refusal is The crop must stay inside the image. When the width field is left empty, the page uses the full image width. The height field behaves the same way with the full image height when it is empty. The crop rectangle is always measured in pixels from the top-left corner of the decoded image, not from a display scale on your screen.

What the Headline 1 by 1 Measures

The headline is the crop width and height separated by by. After a one-pixel crop, the headline is 1 by 1. The label reads Crop. The headline is not the X value and not the Y value. Those appear in the sentence as the starting corner. For that sample, the sentence is The crop starts at 0, 0 and is 1 by 1 pixels. The PNG is not stored. The Width line is 1. The Height line is 1.

The download name is cropped.png on every success. The button reads Download cropped.png. The upload can be PNG, JPG, GIF, WebP, BMP, or AVIF, and the download is still a PNG. Copy result copies the sentence. The download saves cropped.png. The page does not keep the file. The form starts with 0, 0, 1, and 1, and with no image, so the sentence does not exist until the rectangle and the file both pass.

An error headline means the crop was not made, and the sentence and the lines are cleared. X must be a whole number from 0 to the image width minus 1. Y must be a whole number from 0 to the image height minus 1. Width must be a whole number from 1 through the full image width. Height must be a whole number from 1 through the full image height. The crop must stay inside the image is the message when the rectangle would cross an edge. The crop could not be made is the message when imagecrop fails.

How 0, 0 and 1 by 1 Build cropped.png

The page reads X, Y, width, and height as whole numbers, then reads the file. The fields start at 0, 0, 1, and 1. When width is missing, the page substitutes the image width. When height is missing, it substitutes the image height. Each corner is checked so X plus width does not exceed the image width and Y plus height does not exceed the image height. If either sum would pass the edge, the refusal is The crop must stay inside the image.

Interest on a principal is a different product. The Simple Interest Calculator multiplies principal by an annual percent and by years. A principal of 1000 at 5 percent for 2 years earns interest of 100 and a total of 1100. The headline there is the interest. That page does not crop an image. Use it when the sample principal of 1000 should earn interest of 100. Use this page when a 1 by 1 crop at 0, 0 should return the headline 1 by 1 and a download named cropped.png.

What the Crop Does Not Keep

The page does not keep the file. The sentence ends with The PNG is not stored. Reset clears the file field and returns X to 0, Y to 0, width to 1, and height to 1. The headline returns to Choose an image, and the label returns to Result. The sentence and the Width and Height lines are cleared. The next crop needs the image again. The download name will still be cropped.png.

From Default Fields to a 1 by 1 PNG

Leave X at 0, Y at 0, width at 1, and height at 1. Leave the file empty and choose Crop the image. The headline is Choose a PNG, JPG, GIF, WebP, BMP, or AVIF image up to 5 MB. Choose a wide image and crop with those defaults. The headline is 1 by 1. The label reads Crop. The sentence is The crop starts at 0, 0 and is 1 by 1 pixels. The PNG is not stored. The Width line is 1 and the Height line is 1. The download name is cropped.png.

A compounded amount is a different figure. The Compound Interest Calculator compounds a principal at an annual percent. A principal of 1000 at 5 percent, compounded 1 times a year for 1 years, is 1050. The interest line there is 50. The headline there is the amount. That page does not crop pixels. Use it when the sample principal of 1000 should become 1050. Use this page when the sentence should say the crop is 1 by 1 pixels.

Rectangles That Cross the Edge

A common miss is to set X and width so their sum exceeds the image width. The refusal is The crop must stay inside the image, not a field-range message. Another miss is the same on Y and height. Another miss is to read the headline 1 by 1 as the file name. The download is cropped.png. Another miss is to expect the PNG to remain after reset. The PNG is not stored on the page.

A comparison that does not pick a base is a different percent. The Percentage Difference Calculator uses the absolute difference divided by the average of the absolute values, times 100. The absolute difference of 40 and 50 is 10. The average of the absolute values is 45. The percentage difference is 22.22. That page does not crop an image. Use it when you are comparing 40 and 50. Use this page when the rectangle must stay inside the image.

Keeping the Corner and cropped.png

Copy the sentence and download cropped.png before you reset. For the one-pixel sample, the sentence is The crop starts at 0, 0 and is 1 by 1 pixels. The PNG is not stored. The headline is 1 by 1. The Width line is 1 and the Height line is 1. A note that says only 1 by 1 can be any crop at that size. The sentence keeps the corner with the width and height.

A margin from revenue and cost is a different percent. The Profit Margin Calculator subtracts cost from revenue and divides that profit by revenue. Revenue of 200 and cost of 150 give profit of 50 and a margin of 25 percent. The headline there is the margin percent. That page does not copy a rectangle into cropped.png. Use it when the inputs are revenue and cost and the sample margin is 25 percent. Use this page when the record you need is cropped.png and the sentence from that run.

A PNG for the Rectangle You Typed

The headline answers how wide and tall the crop is. From the defaults on a large image, the answer is 1 by 1, and the sentence says the crop starts at 0, 0. A wider typed width changes the headline to match width and height. The label on each successful run reads Crop. The download name is cropped.png. The PNG is not stored.

Checking the Corner and the Sides

Leave the fields at 0, 0, 1, and 1, submit with no file, and confirm Choose a PNG, JPG, GIF, WebP, BMP, or AVIF image up to 5 MB. Crop a larger image with those values and confirm the headline 1 by 1, the label Crop, and the sentence The crop starts at 0, 0 and is 1 by 1 pixels. The PNG is not stored. Confirm Width 1 and Height 1. Confirm the download name cropped.png and the button Download cropped.png.

A sale price after one discount percent is a different reduction. The Discount Calculator multiplies a price by one percent and subtracts. A price of 80 at 25 percent is a discount of 20 and a sale price of 60. The headline there is the sale price. That page does not crop an image. Use it when the sample price of 80 at 25 percent should return a sale price of 60. Use this page when a 1 by 1 crop at 0, 0 should return cropped.png.

Frequently Asked Questions

What does a 1 by 1 crop at 0, 0 return?

The headline is 1 by 1. The label reads Crop. The sentence is The crop starts at 0, 0 and is 1 by 1 pixels. The PNG is not stored. The Width line is 1 and the Height line is 1. The download is cropped.png.

What happens when the crop crosses an edge?

The crop must stay inside the image. The page checks X plus width against the image width and Y plus height against the image height. When either sum would pass the edge, that refusal appears and no PNG is offered.

What are the default field values?

X is 0, Y is 0, width is 1, and height is 1. When width is missing, the page uses the full image width in the check. When height is missing, it uses the full image height. Those defaults do not automatically clear the fields on reset; reset returns 0, 0, 1, and 1.

What does a missing file return?

Choose a PNG, JPG, GIF, WebP, BMP, or AVIF image up to 5 MB. A file that cannot be read returns Choose a PNG, JPG, GIF, WebP, BMP, or AVIF image. The crop could not be made is the message when imagecrop fails. The PNG is not stored.

Is the download always PNG?

Yes. The download is cropped.png encoded as PNG. The button reads Download cropped.png. The sentence ends with The PNG is not stored. A JPG upload still becomes that PNG download.

Does the page keep the image?

No. The PNG is not stored. The page uses the bytes on this request and does not keep the file. Reset clears the image. Download cropped.png during the run if you need the bytes.

What does the headline measure?

The crop width and height in pixels. For the sample one-pixel crop, the headline is 1 by 1 and the label is Crop. The starting corner is in the sentence, not in the headline.

What does reset restore?

X returns to 0, Y to 0, width to 1, and height to 1. The file field is cleared. The headline returns to Choose an image. The label returns to Result. The sentence and the Width and Height lines are cleared.