BrowserTools
Advertisement
Home / Images / Image Compressor (JPG / WEBP / PNG)

Image Compressor (JPG / WEBP / PNG)

Reduce image file size with adjustable quality — see before/after side by side.

Loading Image Compressor (JPG / WEBP / PNG)… If nothing happens, please enable JavaScript.

Frequently asked questions

Is anything uploaded to a server?
No. The entire compression pipeline runs inside your browser using the Canvas API. Your image data is decoded into a local memory buffer and re-encoded there; nothing is transmitted over the network. This makes the tool safe for sensitive or confidential images.
Which output format gives the smallest file size?
WebP almost always produces the smallest file at a given visual quality level, typically 25–35 % smaller than an equivalent JPEG. For images that require a transparent background, WebP is also preferable to PNG because its lossy variant supports an alpha channel at far smaller file sizes.
What is the difference between lossy and lossless compression?
Lossy compression (JPEG, lossy WebP) permanently removes image data that is hard for the eye to notice, achieving dramatic size reductions at the cost of slight quality degradation. Lossless compression (PNG, lossless WebP) reorganises data more efficiently without discarding any information, so the decompressed image is bit-for-bit identical to the original.
Why is my compressed file sometimes larger than the original?
The Canvas API always produces a full-colour encoded output. If your source image was already heavily optimised — for example a palette-reduced PNG or a JPEG saved at a very low quality — the Canvas re-encoding can produce a larger result. Try switching to WebP or lowering the quality slider further.
What quality level should I choose for web images?
For photographs, a JPEG or WebP quality of 75–85 % is generally indistinguishable from the original at normal viewing sizes and cuts file size by 60–80 %. For images with text or sharp edges, stay above 85 % to avoid compression artefacts around high-contrast boundaries.
Is there a file size or resolution limit?
There is no enforced limit, but very large images (above 20 megapixels or 30 MB) may be slow to process or exhaust your browser's canvas memory. If you hit an error, try downscaling the image with the Image Resizer first and then compressing the result.
Does compression affect image dimensions?
No. This tool only changes the encoding of the image; width and height in pixels remain identical. If you also need to scale the image, use the Image Resizer tool and then run the output through the compressor.
How does image compression affect Core Web Vitals?
Unoptimised images are the leading cause of a poor Largest Contentful Paint (LCP) score, one of Google's Core Web Vitals metrics that influences search rankings. Reducing a hero image from 2 MB to 200 KB can lower LCP by several seconds on a mobile connection, directly improving both user experience and SEO.
Can I compress PNG images with transparency?
Yes. PNG files with an alpha channel can be re-encoded either as PNG (lossless, transparency preserved) or as WebP (lossy with alpha, significantly smaller). Compressing a transparent PNG to JPEG will remove the transparency and fill the background with white.
How does the Canvas API compare to server-side tools like ImageMagick?
The Canvas API is convenient and completely private but uses the browser's built-in encoder, which may be slightly less efficient than dedicated server-side libraries such as ImageMagick, libvips, or Squoosh's WASM codecs. For batch processing of thousands of images or maximum compression ratios, a server-side pipeline is preferable. For everyday single-image optimisation, the Canvas output is more than adequate.

About Image Compressor (JPG / WEBP / PNG)

Image compression is the process of reducing a digital image's file size while preserving as much visual quality as possible. There are two fundamental strategies: lossy compression, which permanently discards data that is difficult for the human eye to detect (used by JPEG and WebP), and lossless compression, which encodes data more efficiently without throwing anything away (used by PNG and GIF). JPEG achieves its remarkable size reductions through a mathematical technique called the Discrete Cosine Transform (DCT), which converts blocks of pixels into frequency components and then quantizes the less-important high-frequency detail. WebP, introduced by Google in 2010, combines modern prediction coding and entropy encoding to deliver roughly 25–35 % smaller files than JPEG at equivalent visual quality.

Anyone who publishes content on the web, sends photos by email, or manages a media library benefits from image compression. E-commerce stores routinely compress thousands of product photos to accelerate page loads. Bloggers squeeze hero images below 100 KB to keep their Lighthouse scores high. Mobile developers compress app assets to reduce download sizes. From a Core Web Vitals perspective, large unoptimized images are the single most common cause of a poor Largest Contentful Paint (LCP) score, which directly affects Google search rankings.

This tool performs all compression work directly inside your browser using the HTML Canvas API. When you load an image, the browser decodes it into raw pixel data in memory; the Canvas then re-encodes those pixels at the quality level you choose. The encoded result is offered as a download — your image bytes never travel to any server. There is no account required, no file-size tier, and no watermark. The side-by-side preview lets you see exactly what quality level you are willing to accept before you commit to downloading.

A few practical tips: JPEG quality around 75–85 % is usually indistinguishable from 100 % for photographs, while dropping below 60 % introduces visible blocking artefacts. PNG is lossless by nature, so "quality" controls in PNG mode only affect compression speed, not visual fidelity — but switching a PNG screenshot to WebP at 80 % can cut its size by 60 % or more. If the compressed file comes out larger than the original, it means the source was already heavily optimised; try a lower quality value or a different output format. Always compare at 1:1 zoom before deciding the output is acceptable.

From Fax Machines to WebP: The Surprising History of Image Compression

The roots of image compression reach back to the early days of fax technology. In the 1970s, engineers developed the Group 3 fax standard, which used run-length encoding to transmit black-and-white scanned documents faster over telephone lines — essentially the first widespread use of image compression in consumer technology. The JPEG standard, which would go on to define how a generation stored and shared photographs, was formalised by the Joint Photographic Experts Group in 1992 after nearly a decade of research. Its Discrete Cosine Transform algorithm was inspired by work published by Nasir Ahmed in 1974, originally proposed for speech compression.

The GIF format, introduced by CompuServe in 1987, became the dominant image format on the early web partly because it used the LZW lossless compression algorithm, which kept file sizes manageable over dial-up connections. PNG was created in 1996 as an open, patent-free alternative to GIF, offering superior lossless compression and full-colour support. Meanwhile, the web's appetite for richer imagery drove researchers to develop ever more sophisticated codecs: JPEG 2000 arrived in 2000 with wavelet-based compression, WebP launched in 2010, AVIF (based on the AV1 video codec) appeared in 2019, and JPEG XL was finalised in 2022 — each generation promising better quality at smaller file sizes.

One of the most consequential moments in the history of web image compression came in 2010 when Google open-sourced the WebP format, derived from the intra-frame encoding of its VP8 video codec. Initially met with scepticism, WebP took nearly a decade to gain universal browser support (Safari added it in 2020). Its acceptance marked a turning point: the industry acknowledged that JPEG's 30-year-old algorithm was no longer sufficient for a world where half of all web traffic originates from mobile devices on constrained data plans. Today, serving images in next-generation formats is a standard recommendation in every web performance audit.

Advertisement