Image Compressor

Processed locally — your image never leaves this device.
Two modes: Quality — choose a quality percentage and format; Target KB — enter a KB limit and the tool finds the best quality automatically. Supports JPG, PNG, and WebP.

Upload Image

Click to select or drag and drop

Supports: JPG, PNG, WebP · Max 20 MB

Compression Mode

Adjust quality percentage to balance size and appearance.

Output Format

Quality Level

80%

Resize Options

About Image Compressor

This free browser-based tool compresses JPG, PNG, and WebP images in two modes: quality percentage or exact KB target. All processing runs locally — your image never leaves your device.

Two Compression Modes

Quality Mode lets you pick a quality percentage (1–100%) and output format. Use it when you want control over image appearance or are optimising for websites, email, or storage. Choose JPEG for photos, PNG for graphics with transparency, WebP for best compression.

Target KB Mode lets you specify an exact kilobyte limit (e.g. 200 KB). The tool automatically finds the highest quality that fits within your budget — and scales down dimensions if needed. Perfect for passport photos, visa applications, exam registration portals, and any upload form with a strict size limit.

Quality Compression Mode

The quality slider controls how much lossy compression is applied. Higher quality preserves more detail but produces larger files. Recommended settings:

  • 90%: Minimal visible loss — ideal for print or high-fidelity web images
  • 80%: Good balance — recommended for most web and email uses
  • 60%: Heavy compression — suitable for thumbnails or when size matters most

Format guide: JPEG is best for photographs; PNG for graphics needing transparency (note: PNG uses lossless compression so quality adjustment has no effect); WebP offers the best compression ratio with broad modern browser support.

Target Size Mode

Enter a target in KB and click Compress. The tool runs a binary search across the quality range (0.1–0.92) in 8 iterations to find the highest quality that produces a file at or below your target. If even minimum quality is still too large, it progressively reduces the image dimensions in 0.85× steps, up to 10 times, until the target is met.

Targets use 1 KB = 1000 bytes (decimal kilobytes), consistent with how most government and university upload portals measure file size. Common use cases: passport photos (50–200 KB), exam registration forms (20–100 KB), visa applications, job portal uploads.

Supported Formats

  • JPEG: Lossy compression, best for photos, no transparency. Quality slider has full effect.
  • PNG: Lossless compression, supports transparency. Very small KB targets may require dimension scaling or conversion to JPG.
  • WebP: Modern lossy/lossless format. Excellent compression; supported in all modern browsers.

Key Features

  • Two compression modes: quality slider and exact KB target
  • Binary search quality optimisation (Target KB mode)
  • Automatic dimension scaling when quality alone is insufficient
  • PNG → JPG conversion offer for very small KB targets
  • Before/after preview comparison
  • Optional resize (max width/height) in Quality mode
  • JPEG, PNG, and WebP output support
  • Fully client-side — nothing uploaded, no account required
  • Works on mobile and desktop browsers

How to Compress an Image

  1. Click the upload area or drag and drop a JPG, PNG, or WebP image (max 20 MB).
  2. Choose a compression mode: Quality for manual control, Target KB to hit a specific file size.
  3. Quality mode: Select an output format, set the quality slider or pick a preset, optionally set max dimensions, then click Compress Image.
  4. Target KB mode: Enter your KB limit or pick a preset chip, choose a format, then click Compress to Target.
  5. Review the before/after comparison and size statistics.
  6. Click Download to save the compressed image.
  7. To compress another image, click Upload New Image or New Image.

Frequently Asked Questions

Quality mode gives you direct control over the quality percentage and lets you choose the output format. You compress the image and see the result size. Target KB mode works in reverse — you specify the maximum size you want, and the tool automatically finds the highest quality that fits, performing binary search and dimension scaling as needed. Use Quality mode when you want visual control; use Target KB mode when a form or portal specifies a maximum file size.
PNG uses lossless compression — every pixel is stored exactly as-is. Unlike JPEG, there is no quality dial that trades detail for smaller files. The only way to reduce a PNG file size is to reduce its dimensions. For very small KB targets (e.g. under 50 KB for a large image), the tool will offer to convert the PNG to JPG, which enables lossy compression and can achieve much smaller files at similar visual quality.
No. All compression is performed inside your browser using the HTML5 Canvas API. Your image data never leaves your device and is never sent to any server. This tool works entirely offline once the page is loaded.
For most web and email uses, 80% quality with JPEG format gives an excellent balance between file size and image quality. For high-quality photographs where detail matters (e.g. portfolios), use 90%. For thumbnails or when you need the smallest possible file, 60% is acceptable. WebP at 80% will typically produce a smaller file than JPEG at 80% with similar visual quality.
There are two conventions: decimal (1 KB = 1000 bytes) and binary (1 KiB = 1024 bytes). Most upload portals and government forms use decimal kilobytes when they specify a limit like "maximum 200 KB". This tool uses 1 KB = 1000 bytes to match that convention, ensuring files produced here will reliably pass portal size checks. Using 1024 bytes per KB could produce a file that appears to be under the limit in binary terms but is rejected by a portal measuring in decimal.