inyourbrowser.com

Compress Image

Image compressor is a browser-based tool that reduces JPEG, PNG, and WebP file sizes. It uses adjustable quality settings, supports format conversion, and shows original-vs-compressed size at a glance. The tool runs in your browser.

Drop an image or click to choose

JPG, PNG, or WebP, up to 50 MB. Runs in your browser.

FORMAT

QUALITY 80%

Runs entirely in your browser

How to compress an image

  1. Drop your image onto the page or click to browse. JPEG, PNG, and WebP are all supported.
  2. Adjust the quality slider to balance file size against visual quality.
  3. Click "Compress" and preview the result alongside the original size.
  4. Download the compressed image directly.

Common uses

  • Reducing image size before uploading to a website or CMS, pair with a tool that scales images to a specific width to control both dimensions and file size
  • Shrinking photos to share by email without losing too much quality
  • Compressing product images to speed up e-commerce page load times, you can also convert to WebP for better compression ratios

Technical specification

  • Algorithm or formula: Decode the source image into an off-screen canvas, then re-encode via HTMLCanvasElement.toBlob with a quality argument (0 to 1) for JPEG and WebP, which use lossy compression. PNG re-encoding is lossless and benefits mainly from format change.
  • Browser API or library: Canvas 2D API and canvas.toBlob. No external library.
  • Input limits: Files capped at 50 MB and 50 megapixels (longest side 10,000 pixels), enforced before decoding to avoid memory exhaustion.
  • Output: JPEG (.jpg), PNG (.png), or WebP (.webp) blob with a download button, saved through a short-lived blob: URL.
  • Known limitations: Quality slider is JPEG/WebP only. Some PNGs may compress poorly because the source is already well-optimised. Animated images are flattened to a single frame.

Frequently asked questions

How much can compress-image reduce a photo?
Typical reductions are 50-80% for JPEG photos at 70-80% quality and 20-40% for already-optimised PNGs converted to WebP. Move the quality slider and click Compress again to balance size against visible artefacts in the preview. All processing runs in your browser.
Is my image uploaded to a server?
All compression happens in your browser using the Canvas API. Our servers are not involved at any point.
What image formats are supported?
JPEG, PNG, and WebP are supported as input. The output is JPEG unless you pick PNG or WebP under Format.
Why is the compressed file sometimes larger?
This can happen with PNGs or images already well-compressed. Try switching to JPEG output for the smallest file size.
Is there a file size limit?
Yes. Images up to 50 MB and 50 megapixels (10,000 pixels on the longest side) are accepted. Larger files are rejected before they are decoded. Very large images may be slow on older devices.

Related tools

Resize image
Scale to any size or use platform presets. Instagram, LinkedIn, WhatsApp and more.
Convert image
Convert between JPEG, PNG, and WebP formats. Lossless or quality-controlled.
Image to Base64
Convert any image to a Base64 data URI. Copy directly into HTML, CSS, or JSON.
Compress PDF
Reduce PDF file size in your browser. Lossless optimisation or image re-rendering.
Image to PDF
Convert JPG, PNG, WebP, or GIF images to a PDF. Add multiple images, reorder, download instantly.

Reviewed and tested September 30, 2026.