Image Cropper
Keep a rectangle of a picture and throw the rest away, with the exact pixel numbers rather than a rough drag.
Results
What this tool does
Cropping by hand is fine until you need the result to be exactly 1080 by 1080, or exactly the same rectangle on twenty photos. This page takes the four numbers instead: how far in from the left, how far down from the top, and how much to keep. It tells you how much of the original survives, and hands back the piece as a file. Everything happens in your browser.
Formula
the rectangle is clipped to the edges of the image ; the area left is width × height divided by the original area
Variables
| Symbol | Meaning | Unit |
|---|---|---|
source_w | Original width | — |
source_h | Original height | — |
crop_x | Distance from the left | px |
crop_y | Distance from the top | px |
crop_w | Width to keep | px |
crop_h | Height to keep | px |
format | Save as | — |
quality | Quality | % |
OUT | The piece you keep | — |
OW | New width | px |
OH | New height | px |
KP | Of the picture kept | % |
MP | Megapixels | — |
AR | Shape (width to height) | — |
Worked example
- Original width4032
- Original height3024
- Distance from the left0 px
- Distance from the top0 px
- Width to keep3024 px
- Height to keep3024 px
- Save asimage/jpeg
- Quality85 %
- The piece you keep3024 x 3024 @ 0, 0
- New width3024 px
- New height3024 px
- Of the picture kept75.0 %
- Megapixels9.14
- Shape (width to height)1:1
Limitations
- The calculation runs entirely in your browser. The values you type are never sent to a server.
Frequently asked questions
Where does the crop start from?
From the top-left corner of the original, which is the point every image format calls zero. The first two boxes are how far right and how far down that corner moves; the other two are how much you keep from there. If you ask for more than there is, the rectangle is trimmed to the edge rather than filled with empty space.