Compress Image

Compress an image to an exact target size (20KB, 50KB, 100KB) or by quality. JPE...

SecureFastFree

Updated

Quick answer

An image compressor reduces a photo's file size while keeping it looking sharp. YaliKit's tool can hit an exact target like 20KB, 50KB, or 100KB by binary-searching the quality and downscaling if needed, or you can compress by quality in JPEG, WebP, or PNG. Files are processed on our server with libvips and deleted immediately, never stored.

SSL Secured
256-bit Encryption
Cloud Processing
Mobile Friendly

What You Can Do

Target Size - Hit an exact KB
Smart Detection - Warns on optimized files
3 Output Formats - JPEG / WebP / PNG
5-100% Quality - Fine-grained control
Resize Option - Reduce dimensions too
Aspect Ratio Lock - Prevent distortion
Before/After - Compare the result
Private Processing - Images not stored
Size Comparison - Exact bytes saved

Why Use Compress Image?

Compress to an Exact File Size

Need your photo under exactly 100KB, 50KB, or 20KB for a form, passport portal, or upload limit? Type the target and the tool binary-searches the quality (and downscales if needed) to land at or just under it, the thing most compressors can't do.

Smart Optimization Detection

Unlike other tools that fake compression on already-optimized files, this tool detects when compression would actually increase your file size and tells you why. No wasted downloads, no surprises.

Format Conversion Saves 30%+

Convert a 2.4 MB JPEG to WebP and watch it drop to 1.6 MB at identical visual quality. WebP uses predictive coding and entropy encoding that JPEG simply cannot match, especially on images with large flat-color regions.

Resize + Compress Together

A 4000x3000 photo from your camera is 8 MB. Resize to 1920x1440 for web use and the file drops to 1.8 MB before you even touch the quality slider. Combining both operations in one step gives the biggest reduction.

Before/After Comparison

Side-by-side thumbnails with exact byte counts for original and compressed versions. A percentage badge on the preview tells you the reduction at a glance so you can fine-tune quality without guessing.

Private by Design

Your image is processed on our own server with libvips (the engine behind Sharp), then deleted immediately. No third-party clouds, no image galleries, no tracking. The file goes in, the compressed file comes out, nothing is stored or shared.

Mobile Floating Download

On phones, the Download button floats at the bottom of the screen once your image is ready, so it stays within thumb reach while you scroll through the size, quality and resize options. No hunting for a tiny button buried in the UI.

Real-World Scenarios

Web Performance Optimization

A product page with 12 uncompressed images loads in 8+ seconds on mobile. Compressing each to WebP at quality 75 and resizing to 800px width cuts total page weight from 35 MB to 2.4 MB, bringing load time under 2 seconds and improving Google Core Web Vitals scores across all three metrics.

Email Attachments That Actually Send

Your client needs 20 event photos and their corporate Exchange server has a 10 MB attachment limit. Each phone photo is 4-6 MB. Compressing to JPEG at quality 80 and resizing to 1600px gets each file under 400 KB, letting you attach all 20 in a single 8 MB email that will not bounce.

Government Document Submissions

Visa applications, passport renewals, and university admissions often require photos between specific file sizes (e.g., 50 KB to 500 KB for Indian passport). Use the quality slider to dial in exactly to the required range, and resize to the specified pixel dimensions in one step.

Photography Archive Management

A wedding photographer with 50,000 JPEG files at 8 MB each is using 400 GB of cloud storage at $10/month. Creating web-quality versions at quality 80 and 2400px wide reduces each to under 1 MB, freeing up 350 GB while keeping full-resolution originals on local backup drives.

How It Works

1

Drop or Browse for Your Image

Drag a photo onto the upload zone or tap to select from your device. Accepts PNG, JPG, GIF, WebP, and most image formats. You will see an instant preview with the original file size.

2

Pick Your Output Format

Choose JPEG for photos (best compatibility), WebP for the smallest files at comparable quality, or PNG when you need lossless output with transparency support.

3

Choose Target Size or Quality

Pick 'Target size' and type an exact limit (20KB, 50KB, 100KB, 200KB) and we hit it automatically, or pick 'Quality' and use the slider/presets. Optionally enable resize to cap the width.

4

Review and Download

Check the before/after comparison and the percentage reduction badge. If the tool detects your file is already optimized, it tells you rather than producing a larger output. Download when satisfied.

Compression Advice From a Photographer

The 75/80 Rule for Web Images

For any image destined for a website, start at quality 75-80 in JPEG or WebP. This is the point where most photos become indistinguishable from the original on screen, but file sizes drop by 60-70%. A 3 MB photo from your phone typically compresses to 350-500 KB at quality 78.

Resize First, Then Compress

Always reduce dimensions to what you actually need before touching the quality slider. A 4032x3024 iPhone photo resized to 1200px wide drops from 5.2 MB to 1.1 MB at quality 100 -- then compressing to quality 80 brings it to 280 KB. Dimension reduction is the single most impactful optimization.

Never Re-Compress a Compressed JPEG

Each compression cycle adds generation loss. If your source image is already a compressed JPEG from a messaging app or social media download, compressing it again at the same quality level will degrade it visibly without much file size benefit. Use WebP output instead for better results from already-compressed sources.

WebP for Everything Except Email

WebP produces files 25-35% smaller than JPEG at equivalent visual quality, and it supports transparency (unlike JPEG). Use it for websites, apps, and any modern platform. The only exception is email attachments, where some older clients still cannot display WebP inline -- use JPEG for those.

Frequently Asked Questions

Switch to 'Target size' mode, type your number (or tap a preset like 100 KB), and hit Compress. The tool sends your image to our server, which binary-searches the JPEG/WebP quality (and automatically reduces the dimensions if quality alone can't get there) until the file lands at or just under your target. It usually converges in under a couple of seconds. This is the exact intent behind searches like 'compress image to 100kb' or 'reduce image size to 50kb', and most tools only give you a quality slider that makes you guess.
It depends on how aggressive the target is relative to the image. Going from a 3MB photo to 200KB is nearly invisible; forcing a detailed 12-megapixel photo down to 20KB will show artifacts because there simply isn't enough room for the detail. The tool always keeps quality as high as possible for your target. It only lowers quality (and then dimensions) as much as it has to. If the result looks rough, raise the target or enable 'Also resize' to a smaller width so the pixels that remain stay sharp.
This is more common than people realize, and this tool actually detects it and warns you. It happens in three scenarios: (1) Your original JPEG was already compressed at a lower quality, and re-encoding at 85% or above creates a larger file because you are adding data, not removing it. (2) You are converting an optimized PNG to JPEG at high quality -- the JPEG overhead exceeds what you save. (3) The image is tiny (under 50 KB) and format headers eat into savings. When this tool detects the output would be larger, it shows a specific message with the exact sizes and suggests lowering quality or switching to WebP.
From a photographer's perspective: at quality 95, a 5 MB photo compresses to around 2.1 MB with virtually no visible difference -- pixel-peeping at 400% zoom might reveal very slight color shifts in gradients. At quality 85, that same photo drops to about 900 KB, and you will start seeing slight softening in fine details like hair strands or fabric texture, but it looks perfect at normal viewing distance. At quality 75, you are down to roughly 550 KB, and compression artifacts become visible in smooth gradients (sky, skin) as subtle banding. For web images viewed on screen, 75-80 is the sweet spot. For portfolio prints, stay at 90+.
WebP is supported by every major browser: Chrome, Firefox, Safari (since version 14, late 2020), Edge, Opera, and all Chromium-based browsers. The only holdout was Internet Explorer, which Microsoft discontinued. Global browser support for WebP now exceeds 97%. If your audience is general web users, WebP is completely safe to use. The only edge case is email clients -- some older email apps do not render WebP inline, so stick with JPEG for email attachments.
Lossy compression (JPEG, WebP lossy) permanently discards image data that human eyes are less sensitive to -- high-frequency color variations and fine luminance details. A 5 MB RAW photo might compress to 500 KB at quality 75 with no visible difference at normal viewing. Lossless compression (PNG, WebP lossless) keeps every single pixel identical but only achieves 10-40% reduction by encoding repeated patterns more efficiently. Think of it this way: lossy is like summarizing a paragraph -- the meaning stays but exact words change. Lossless is like compressing a ZIP file -- nothing is lost.
PNG uses lossless DEFLATE compression, which works by finding repeated byte patterns. Photographs contain very few repeated patterns -- every pixel in a sunset gradient is slightly different -- so DEFLATE has almost nothing to work with. A 4 MB photograph saved as PNG might compress to 3.8 MB. PNG compression works well on screenshots, diagrams, and graphics with large solid-color areas where there are many repeated patterns. If you need a smaller photo file, switch to JPEG or WebP lossy rather than trying to squeeze a PNG.
Gmail allows 25 MB total per email (all attachments combined). Outlook/Hotmail caps at 20 MB. Yahoo Mail allows 25 MB. For corporate Exchange servers, the limit is often 10 MB or even 5 MB set by IT admins. A practical rule: compress images to under 1 MB each if you are attaching multiple photos. For a single hero image in a business email, 2-3 MB is acceptable on Gmail/Yahoo but will bounce on strict corporate servers. This tool's 'Balanced' 75% preset with a resize to 1920px wide typically gets a phone photo from 6 MB down to 300-500 KB.
Most countries specify exact requirements. US passport: 2x2 inches (600x600 pixels minimum), file size between 240 KB and 10 MB, JPEG format. UK passport: 600x750 pixels, under 10 MB. Indian passport/visa: 350x350 pixels, file size between 10 KB and 1 MB. Schengen visa: 35x45 mm (413x531 pixels), 50 KB to 500 KB, JPEG. For all of these, use this tool to resize to the exact pixel dimensions first, then compress as JPEG at quality 85-90 to stay within the file size window. Going below quality 80 for identity documents risks rejection due to visible artifacts around facial features.
Compression runs on our server using libvips (the same high-performance engine behind Sharp) rather than the browser's Canvas encoder. libvips produces smaller files at the same visual quality than a browser can, supports proper chroma subsampling and progressive JPEG, and makes the exact target-size search fast and reliable. Your file is streamed to our server, compressed in memory, returned, and never stored. For 99% of use cases the visual result is indistinguishable from the original at web-appropriate sizes; the win is a smaller file and the ability to hit an exact KB target.
Yes. Our server re-encodes the image with libvips, which does not carry camera EXIF metadata (model, GPS coordinates, date taken, lens info) into the compressed output. That is a privacy benefit -- you are not broadcasting your location when you share the compressed file. If you need EXIF for archival or cataloging, keep your original and use the compressed version only for sharing. Professional photographers should treat compressed exports as delivery copies, not archival masters.
For web output, sRGB is the safe target because browsers display in sRGB anyway. If your original uses a wide gamut like Adobe RGB or ProPhoto RGB (common in professional photography), treat the compressed file as a web/delivery copy and keep your wide-gamut original for any print pipeline. When in doubt, convert to sRGB in your editor before compressing so the colors you see on screen match what viewers see.
Each re-compression cycle introduces a generation loss, similar to making a photocopy of a photocopy. The first compression at quality 85 is barely noticeable. Re-compressing that output at 85 again adds a second layer of artifact, especially around sharp edges and text. By the third or fourth cycle, you will see visible blockiness and color bleed. As a rule: never compress a compressed JPEG below its original quality level, and minimize re-compression cycles. If you need to adjust an already-compressed image, do it once at the quality level you need and treat the result as final.
Google's Largest Contentful Paint (LCP) metric directly measures how fast your biggest visible image loads. An uncompressed 5 MB hero image on a page can push LCP past 4 seconds, which Google considers 'poor'. Compressing that to 200 KB WebP drops LCP under 1.5 seconds on typical connections, which rates as 'good'. Google PageSpeed Insights specifically flags unoptimized images as a top recommendation. For SEO: use WebP with JPEG fallback, serve responsive sizes via srcset, and aim for hero images under 200 KB and thumbnails under 50 KB.
Resizing has a much larger impact. A 4000x3000 image (12 megapixels) resized to 2000x1500 (3 megapixels) is literally one-quarter the pixel data, giving you roughly a 70-75% file size reduction before quality adjustment. Dropping quality from 100 to 75 on the same full-resolution image gives you roughly 60-65% reduction. The optimal strategy: first resize to the largest dimension you actually need (1920px for full-width web, 800px for blog thumbnails, 400px for cards), then adjust quality to 75-80. This two-step approach routinely turns a 6 MB phone photo into a 150-300 KB web-ready image.
PNG is the traditional choice for transparency and remains universally supported. WebP also supports transparency (alpha channel) with significantly better compression -- a transparent PNG logo at 150 KB might be 45 KB as WebP. JPEG does not support transparency at all; transparent areas will be filled with a solid color (usually white or black). If you need a transparent image for a website and your audience uses modern browsers (97%+ do), WebP with transparency is the best option. For maximum compatibility including email clients and older software, stick with PNG.
This tool processes one image at a time, which gives you individual control over quality and format for each file. For batch compression, check the Bulk Image Compress tool on YaliKit which handles multiple files with consistent settings. The single-image approach here is better when different photos need different treatment -- a portrait might look great at quality 70, while a product shot with fine text needs quality 85+.
The tool handles images up to approximately 50 MB and resolutions up to around 10000x10000 pixels, which covers virtually all consumer and prosumer camera output. RAW files (CR2, NEF, ARW) are not directly supported -- convert them to JPEG or PNG first in your photo editor, then use this tool for web-optimized compression. For extremely large panoramas or composites exceeding these limits, resize first using the Resize Image tool, then compress.

Related Tools