CompressJPEG.in
Toolkit — resize

Resize Image to Exact Dimensions

Set an exact width × height, a longest side, or a percentage — then optionally compress to an exact file size in the same run.

Upload your images

Drop JPEG images here

or choose files from your device

JPG, JPEG, PNG, WebP, AVIF · up to 30 MB each · max 20 files

You can also paste an image with Ctrl / ⌘ + V

Three resize modes, one workflow

Open the editor after uploading and expand Advanced options → Resize. Choose Longest side for quick downscaling, Exact W×H for form and passport requirements, or % for proportional scaling.

Combine resize with Target Size when a portal demands both specific dimensionsand a maximum file size — e.g. 1200 × 800 px under 100 KB. Shortcuts: pressC to compress,D to download.

Dimensions and file size are separate checks

Upload forms validate these two properties independently. A photo can be exactly the right pixel size and still be rejected for exceeding the byte limit — or be small enough and rejected for having the wrong aspect ratio. That is why the useful move is usually both in one run: set the dimensions, enable a target size, and press Compress once. Resizing first also helps the size limit, because fewer pixels give the encoder less to describe, so the same KB budget produces a visibly sharper result.

If your requirement is only a file size, you can skip resizing entirely — the100KB and200KB preset pages handle that case. For photo fields that specify both, the passport photo resizer andsignature resizer pre-fill common dimension pairs, andthe online-form hub routes you to the right preset. To understand what quality reduction actually does to the file, see theguide to reducing JPEG file size.

Simple 3-step workflow

How it works

Three steps to a smaller JPEG.

  1. Drop or Paste

    Upload your JPEG

    Drop your JPG, browse files, or paste directly from clipboard with Ctrl / ⌘ + V.

  2. Smart or Exact Limit

    Choose your target

    Select an exact file size limit (like 100KB) or use Smart mode for automatic balance.

  3. Zero Uploads

    Download the smaller file

    Save your compressed photo instantly with zero uploads and pristine clarity.

Privacy by Architecture · Client-Side Execution

Your images stay on your device

CompressJPEG processes your images directly in your browser. Your photos are not uploaded to a server.

Network traffic: 0 B

No uploads

Images stay on your device.

Processed locally in browser
No tracking

No signup

Start compressing immediately.

Processed locally in browser
WebAssembly sandbox

No watermark

Your compressed images remain yours.

Processed locally in browser

Resize questions

Image Resize FAQ

How do I resize an image to exact dimensions?

Upload your image below to open the editor, then expand Advanced options → Resize → Exact W×H. Enter width and height (e.g. 1200 × 800), choose Crop to fill for an exact size, Fit inside to keep the whole photo, or Stretch to ignore aspect ratio — then press Compress.

Can I resize and compress to a target file size at the same time?

Yes — that is the flagship workflow. Pick Target Size (e.g. 200 KB) and enable Exact dimensions together. The tool resizes once, then binary-searches quality for the highest quality that fits under your limit.

Does resizing happen in my browser?

Yes. Decoding, resizing, and re-encoding run locally with WebAssembly codecs. Your photos never leave your device.

What is the difference between Crop to fill, Fit inside, and Stretch?

Crop to fill center-crops to your exact aspect ratio then scales — best for passport and form photos. Fit inside scales the whole photo to fit within your dimensions without cropping. Stretch forces exact pixels but can distort faces.

Free forever · No account needed · No watermark

Need an exact size and exact dimensions?

Upload once — set dimensions and file size together in the editor.