oktools

Image Cropper & Resizer

Crop an image to any shape or to an exact social media size — Instagram, YouTube, X, LinkedIn, Facebook or Open Graph — then rotate, flip and resize it and save it as JPEG, WebP, AVIF or PNG. Drag the crop box or type its position in pixels. The image is processed by your own browser and never uploaded, and EXIF data such as GPS location is removed from the result.

No image yet

Add an image above. Pick a shape or a social media size, drag the box over the part you want to keep, and download the result.

How it works

The image is opened by the browser’s own decoder and drawn into a preview canvas that is never larger than 2048 pixels on its longest side, whatever the size of the original. Every number you see — the crop box’s X, Y, width and height and the output size — is measured in pixels of the full image as it looks after rotation and flips, not in screen pixels, so the box can be scaled to any screen without changing what it selects. Dragging measures how far the pointer has travelled since you pressed, converts that into image pixels with the ratio between the image and the preview on screen, and rebuilds the box from where it started, so rounding never accumulates over a long drag.

Rotation and flips are kept as a description of the turn rather than applied to the pixels straight away. When the result is written, the rotation, the flip, the shift to the crop’s corner and the scale to the output size are combined into a single transform, and the original image is drawn through it once with the browser’s high-quality smoothing. The pixels are resampled one time only, however many times you turned the picture or changed the crop.

A shape preset locks the crop box: dragging a corner keeps the opposite corner pinned and follows whichever direction the pointer moved further, and dragging an edge grows the box about its centre. The output size is worked out from the exact ratio of the preset rather than from the crop, which has to land on whole pixels: a 16:9 crop of a 1000-pixel-wide image is 1000 × 563, which scaled to 1280 wide would be 721 tall, yet the YouTube thumbnail preset still writes exactly 1280 × 720. Half a second of quiet after a change, the crop is encoded again and its real file size is shown, and only formats the browser proved it can write in a one-pixel test are offered.

Examples

A square post from a phone photo

The 1:1 box is as tall as the photo and centred, then the 3024-pixel square is scaled down by 0.357 to the preset size — no enlargement, so no warning.

Input
IMG_2041.jpg — 4032 × 3024
Shape: Instagram post (1080 × 1080)
Output
Crop: X 504, Y 0, 3024 × 3024
Output: IMG_2041-1080x1080.jpg — 1080 × 1080

A sideways photo turned into a thumbnail

Rotating right turns the 3024 × 4032 picture into 4032 × 3024, and the 16:9 box is laid across its full width.

Input
Source: 3024 × 4032
Rotate right, then Shape: YouTube thumbnail (1280 × 720)
Output
Rotated: 4032 × 3024
Crop: X 0, Y 378, 4032 × 2268
Output: 1280 × 720

A small screenshot as a link preview

The 800-pixel screenshot is narrower than the 1200-pixel preset, so the crop is enlarged 1.5 times and the tool warns that the result will look softer.

Input
screenshot.png — 800 × 600
Shape: Open Graph (1200 × 630)
Output
Crop: X 0, Y 90, 800 × 420
Output: 1200 × 630 — enlarged 1.5×

Typing the crop instead of dragging

With the 16:9 shape locked, typing a width carries the height along; with Free, only the width changes. Locking the output to width 640 gives a height from the crop’s own shape.

Input
Image 1920 × 1080, crop X 240, Y 135, 1440 × 810
Shape 16:9, width → 1280
Shape Free, output width → 640
Output
Crop: X 240, Y 135, 1280 × 720
Output: 640 × 360

Supported formats

  • Opens: JPEG, PNG, WebP, AVIF, GIF, BMP, ICO and SVGAnything your browser can display, up to 50 MB. HEIC iPhone photos open in Safari, which decodes them natively. An animated GIF or WebP is cropped as its first frame.
  • Writes: JPEG, WebP, AVIF and PNGThe output starts in the source’s own format where the browser can write it. Formats your browser cannot encode are listed but disabled. JPEG gets a background colour under any transparent pixels, because it cannot hold transparency.
  • Shapes: free, original, 1:1, 4:3, 3:2, 16:9, 9:16 and 4:5Plus eight social sizes that fix the output too: Instagram post, portrait and story, YouTube thumbnail, X post, LinkedIn banner, Facebook cover and Open Graph.
  • Output up to 20,000 pixels a sideTyped in pixels, with a lock that keeps the shape of the crop. Whether a very large output can be drawn depends on the browser’s canvas limit.

Use cases

  • Social media posts and bannersCut a photo to the exact pixel size a platform asks for, so it is not cropped again by the platform in a way you did not choose.
  • Screenshots for documentationTrim a screenshot down to the dialog or the error that matters and paste it straight into a ticket or a pull request with Copy image.
  • Avatars and thumbnailsMake a square from a portrait for a profile picture, or a fixed-size thumbnail for a CMS that rejects anything else.
  • Fixing sideways photosTurn a photo that a scanner or an old camera saved on its side, and mirror a selfie that came out reversed.

Limitations

  • Quarter turns onlyRotation is in steps of 90 degrees. There is no free rotation to straighten a tilted horizon; use a photo editor for that.
  • One image at a timeEach image gets its own crop, so there is no batch mode. To resize or convert many images with the same settings, use the image compressor.
  • Colour is converted to sRGBA canvas works in sRGB, so a wide-gamut (Display P3) photo loses its most saturated colours and an embedded ICC profile is not carried over.
  • Platform sizes changeThe social presets are the sizes the platforms recommend at the time of writing. Some show an image differently on phones and computers — Facebook cuts the sides of a cover on a phone — so keep text away from the edges.
  • Large images depend on the browserBrowsers cap canvas size: iPhone and iPad Safari at around 16 megapixels, desktop browsers far higher. An output above the cap reports an error rather than a broken file.

Frequently asked questions

How do I crop an image to an exact size like 1080 × 1080?

Open the image, choose the size from the Shape list (Instagram post is 1080 × 1080) or pick 1:1 and type 1080 into the output width. The crop box is locked to the matching shape, so drag it over the part you want to keep and the result is written at exactly that size. If none of the presets fits, choose Free, draw the crop, then type the output width and height you need with the lock open.

What size should an Instagram post, story or YouTube thumbnail be?

Instagram recommends 1080 pixels wide: 1080 × 1080 for a square post, 1080 × 1350 (4:5) for a portrait post, which takes up the most room in the feed, and 1080 × 1920 (9:16) for stories and reels. A YouTube thumbnail is 1280 × 720 (16:9), an Open Graph image for link previews 1200 × 630, and a LinkedIn profile banner 1584 × 396. Each of these is a preset here that sets both the crop shape and the output size. Platforms revise their numbers from time to time, so check the upload preview before you publish.

Are my images uploaded to a server?

No. The image is opened, cropped and encoded by your own browser, and the download is made from memory on your device. Nothing is sent over the network, so it is safe for screenshots of internal systems, ID scans and personal photos. You can open the network tab in your browser’s developer tools while you work and watch it stay empty.

Why does my cropped image look blurry?

Because it was enlarged. When the output is larger than the area you cropped, the browser has to invent the missing pixels, and the result looks soft; the tool warns you whenever that happens and says by how much. Crop a larger area of the photo, or choose a smaller output size. A small crop of a phone photo is usually still sharp for a 1080-pixel post, but a crop of a 600-pixel screenshot will not be.

How do I rotate or flip an image?

Use the rotate left and rotate right buttons above the image to turn it a quarter at a time, and the two flip buttons to mirror it left to right or top to bottom. The crop box turns with the picture, so it stays on the same part of the photo. Rotation and flips are applied to the original pixels in the same step as the crop, so they cost no extra quality.

What is the difference between cropping and resizing an image?

Cropping cuts away the edges and keeps the pixels you select unchanged; resizing scales every pixel of the image up or down. Changing the shape of a picture — a landscape photo into a square — needs a crop, because resizing to a different shape stretches it. This tool does both at once: the crop picks the part of the picture and the output size scales it, and with the ratio lock on the two can never disagree.

Does cropping remove EXIF data and GPS location?

Yes. The output is drawn on a canvas and encoded from its pixels, so the camera model, the date, the GPS coordinates and any other EXIF, XMP or IPTC metadata are not in the file you download. The orientation the camera recorded is applied before you see the image, so what you crop is the right way up.