oktools

Image Compressor & Converter

Compress JPEG, PNG and WebP images, resize them to a maximum width or height, and convert between JPEG, WebP, AVIF and PNG — one file or a whole batch, downloaded singly or as a ZIP. Your images are processed by your own browser and never uploaded, and EXIF data such as GPS location is removed from every re-encoded file.

Settings

Lower is smaller. PNG output ignores it.
Resize to fit (px)
Empty keeps the size. Images are never enlarged.

No images yet

Add one or more images above. Each is compressed as soon as it arrives, and changing a setting reprocesses them all.

How it works

Each file is opened by the browser as an ordinary image — the same decoder that shows pictures on web pages — so anything your browser can display can be read: JPEG, PNG, WebP, AVIF, GIF, BMP, ICO and SVG. A JPEG’s EXIF orientation is applied as it is decoded, so a portrait phone photo stays upright. The image is then drawn onto an off-screen canvas at its output size, with the browser’s high-quality smoothing, and the canvas is encoded with the format and quality you chose. Formats without transparency (JPEG) get the background colour painted under any transparent pixels first, instead of turning them black.

When the tool starts, it asks the browser to encode a one-pixel image in every format and checks what comes back, because a canvas asked for a format it cannot write silently returns a PNG instead. Formats that fail the test are disabled in the list rather than producing mislabelled files. Keep original writes each file in its own format where that is possible. Browsers cannot write GIF, BMP, ICO, SVG or HEIC: the first four become PNG, which keeps their transparency, and HEIC photos become JPEG.

Every result is compared with its input. When it is the same format at the same dimensions and not smaller, the original file is kept and labelled as such. Download all packs the results into a ZIP built in the page itself: the entries are stored rather than compressed again, since image formats are compressed already and a second pass would save almost nothing.

Examples

Fit a phone photo for a blog post

With Max width 1600 and the height left empty, the 12-megapixel photo is scaled to exactly 1600 pixels wide and its height follows from the 4:3 ratio. Its EXIF data, including any GPS location, is not in the output.

Input
IMG_2041.jpg — 4032 × 3024, JPEG
Max width: 1600   Max height: (empty)
Format: WebP   Quality: 80
Output
IMG_2041.webp — 1600 × 1200

Fit a portrait image inside a box

Both limits apply and the tighter one wins: the image is scaled by 1080/1800 = 0.6, so it fits the height exactly and is narrower than the box.

Input
portrait.png — 1200 × 1800
Max width: 1920   Max height: 1080
Output
portrait.png — 720 × 1080

Never upscale a small image

Limits only shrink. An icon already smaller than the box keeps its size and its format; if the re-encoded file is no smaller than the original, the original is the one you get, marked Original kept.

Input
favicon.png — 64 × 64
Max width: 1600   Format: Keep original
Output
favicon.png — 64 × 64

Batch with clashing names

Converting photo.png and photo.jpg to WebP would give two files called photo.webp. Inside the ZIP the second becomes photo (2).webp, in the order the files were added.

Input
photo.png, photo.jpg, Photo.gif → Format: WebP
Output
photo.webp
photo (2).webp
Photo (3).webp

Supported formats

  • Reads: JPEG, PNG, WebP, AVIF, GIF, BMP, ICO and SVGWhatever your browser can display. HEIC and HEIF iPhone photos open only in Safari 17 or later, which reads them natively; other browsers report the file as unreadable. An animated GIF or WebP is read as its first frame.
  • Writes: JPEG, WebP, AVIF and PNGJPEG and PNG work in every browser. WebP is written by Chrome, Edge and Firefox, and AVIF by recent Chromium-based browsers; a format your browser cannot write is shown as unavailable in the list.
  • Quality from 1 to 100Passed to the browser’s JPEG, WebP or AVIF encoder; the same number gives different file sizes in different formats and browsers. PNG is lossless and ignores it.
  • Single files or a ZIPEach result downloads on its own with its new extension, or all of them together as one ZIP with unique names.

Use cases

  • Speed up a websiteImages are usually the heaviest part of a page and the Largest Contentful Paint element. Resizing hero images to the width they are shown at and serving WebP is the quickest Core Web Vitals win there is.
  • Fit an upload limitShrink photos for a form, a ticketing system, a CMS or an email that caps attachments at a few megabytes, without installing an editor.
  • Strip location data before sharingRe-encoding drops EXIF, so GPS coordinates and camera details are gone from photos you post or send — and since nothing is uploaded, the photo never touches a third-party service on the way.
  • Convert between formatsPNG to JPEG for a photo saved in the wrong format, JPEG to WebP for a web page, an SVG or ICO to PNG for a tool that wants a bitmap, or AVIF back to JPEG for an app that cannot read it.

Limitations

  • No advanced PNG optimisationPNG output is the browser’s own encoder, which does not reduce colours or search for the best compression settings the way pngquant or oxipng do. For screenshots and logos, WebP is usually the smaller result here.
  • Colour is converted to sRGBA canvas works in sRGB, so a wide-gamut (Display P3) photo loses its most saturated colours, and embedded ICC profiles are not carried over.
  • Animation is not keptAnimated GIF and WebP files are reduced to their first frame. Use a dedicated GIF tool such as gifsicle to shrink an animation.
  • Very large images depend on the browserBrowsers cap canvas size: iPhone and iPad Safari at around 16 megapixels, desktop browsers far higher. An image above the cap reports an error; set a maximum width or height to bring it under.
  • Speed and results vary between browsersEvery browser ships its own encoders, so the same image at the same quality gives slightly different sizes in Chrome, Firefox and Safari, and AVIF encoding can take a few seconds per large photo.

Frequently asked questions

How do I compress an image without losing quality?

Drop the image in, leave the format on Keep original and try a quality of 75 to 85: for photos that range usually shrinks a file by half or more with no difference you can see at normal viewing size. Drag the slider on the preview to compare the original and the result side by side before you download. If the file still needs to be smaller, resizing it does far more than lowering the quality — a 4000-pixel photo shown 1200 pixels wide is carrying eleven times the pixels it needs.

Should I use JPEG, WebP, AVIF or PNG?

For photos on the web, WebP is the safe modern choice: typically 25–35% smaller than a JPEG of the same visual quality and supported by every current browser. AVIF is smaller still, but slower to encode and only offered here when your browser can write it. Use JPEG when the image goes somewhere that may not read the newer formats, such as an email or an old CMS. Keep PNG for screenshots, diagrams and logos with sharp edges, flat colour or transparency — a photo saved as PNG is usually several times larger than as JPEG.

Are my images uploaded to a server?

No. The images are opened, resized and re-encoded by your own browser, using the same canvas that draws web pages, and the results are saved straight from memory. Nothing is sent over the network, which makes the tool safe for screenshots of internal systems, personal photos and documents — open the network tab while you compress and it stays empty.

Why did my image get bigger?

Re-encoding is not always a win. A PNG that was already optimised, or a JPEG saved at a lower quality than the one you chose, can come out larger. When the result is the same format at the same size and is not smaller, the tool hands you the original file instead and marks it Original kept. If you converted to another format, the larger file is shown with its size so you can pick a different format or quality.

Does compressing remove EXIF data and GPS location?

Yes, for every file that is re-encoded. Drawing an image onto a canvas keeps only its pixels, so the camera model, the date, the GPS coordinates and any other EXIF, XMP or IPTC metadata are not in the output. The rotation the EXIF data asked for is applied to the pixels first, so photos keep their orientation. A file marked Original kept is the untouched original and still carries its metadata.

How do I resize an image to a specific width?

Enter the width in Max width and leave Max height empty. Every image wider than that is scaled down to exactly that width, with its height worked out from its own aspect ratio; images that are already narrower are left at their size, since enlarging only adds blur. Fill in both boxes to fit images inside a box, such as 1920 × 1080 for a full-HD screen.

Can I compress many images at once?

Yes. Drop or choose as many files as you like, or paste images from the clipboard, and each one is processed in turn with the same settings. Changing a setting reprocesses the whole batch. Download all saves every result in a single ZIP file, with names made unique if two files would otherwise collide.