Compress Image
Compress Image Under a Target Size in KB
Decrease an image's file size: set a target like 100KB or use the quality slider. Compress JPG, PNG, WebP, and GIF images in your browser without uploading them.
Compress Image decreases picture file size in your browser without uploading files to any server. Select Target Size mode to hit strict 20 KB, 50 KB, or 100 KB thresholds for exam forms, or use Quality mode for custom compression. Works on JPG, PNG, WebP, and GIF up to 50 MB.
- Runs in your browser
- Nothing uploaded
- No sign-up
- Free, no daily limits
- 1Add your file
- 2Choose settings
- 3Download
Compression Mode
Supports decimals: 100, 100.5, 1,000 (comma as separator)
Output Format
How it works
- 1. Upload your images
- 2. Enter your target file size (e.g., 100KB)
- 3. Click Compress and download
Drop images here or click to upload
JPG, PNG, WebP, GIF (max 50MB each)
Perfect for:
Email Attachments
Compress to under 500KB
Website Images
Fast loading, better SEO
Social Media
Faster uploads
Save Storage
Free up device space
What is Image Compression?
Compress Image is a free in-browser tool that reduces image file size without uploading your files. Image compression shrinks a photo while preserving its visual quality, which is essential for faster website loading, smaller email attachments, and saving storage space on your device — and because it runs entirely in your browser, your images never leave your device.
How to Use This Tool
Upload your images
Click or drag to upload
Set compression
Choose quality or target size
Download result
Save compressed images
Frequently Asked Questions
How does compression work?
Our smart algorithms reduce file size while preserving visual quality as much as possible. For target size mode, it iteratively adjusts quality and dimensions to hit your goal.
Will quality be lost?
Some quality loss may occur when aiming for very small file sizes, but our algorithms preserve detail and visual fidelity. JPG and WebP formats offer the best compression.
Is my data safe?
Yes! All processing happens in your browser - nothing is uploaded to any server. Your files never leave your device.
What formats are supported?
JPG, PNG, WebP, and GIF input formats are supported. You can output to JPG, PNG, or WebP.
Compress JPG to a specific size
Need an exact KB or MB target? Each preset uses this compressor with a pre-set budget.
Related Image Tools
100% Private: All compression happens in your browser. Your images never leave your device.
Last updated
Compress Image shrinks the storage footprint of JPG, PNG, WebP, and GIF files using client-side HTML5 Canvas encoding. Because every calculation runs inside your web browser, sensitive documents, certificates, and personal portraits never travel across the internet. There are no server upload queues, accounts, or file count quotas.
The tool provides two operating modes: Target Size mode, which searches for the optimal quality and scale factor to fit beneath a specified kilobyte ceiling (such as 20 KB, 50 KB, or 100 KB for exam applications), and Quality mode, which applies a fixed compression percentage while preserving native pixel dimensions. Files up to 50 MB are supported on modern desktop and mobile browsers.
How it works
1. Drop or select your images
Drag single photos or batches of JPG, PNG, WebP, or GIF files into the upload box. Files up to 50 MB are loaded directly into browser memory.
2. Select your compression mode
Choose Target Size mode to specify a kilobyte budget like 50 KB or 100 KB, or pick Quality mode to adjust compression manually with the slider (defaulting to 75%).
3. Choose your export format
Pick JPG for photographic prints and portals, PNG to preserve transparent graphics, or WebP for modern web publishing.
4. Run compression and inspect results
Click the compress button to run the canvas optimization. Compare before and after kilobyte numbers, inspect savings percentages, and download individual files or a combined ZIP archive.
When you'd use it
Meeting strict exam portal upload limits
Government recruitment portals including UPSC, SSC, IBPS, and state PSCs frequently mandate candidate photographs capped strictly below 20 KB or 50 KB. Target Size mode eliminates guesswork by calculating the highest quality that fits beneath that ceiling.
Speeding up website image loading
Large camera photographs slow down page loading and slow down browser page rendering. Compressing hero images and product catalogs to WebP at 75% quality lowers data usage without creating visible compression noise.
Staying under email attachment ceilings
Email providers regularly enforce 20 MB or 25 MB per-message attachment caps. Compressing high-resolution event photos using the 500 KB preset lets you send complete image sets in one message.
Combining photos and signatures for job forms
Job applications often require preparing portrait photos and signatures together. Once your images are compressed here, join them into a single file using [Photo & Signature Joiner](/image/photo-signature-joiner).
How does Target Size mode fit an image under a KB limit?
In Target Size mode, the compression engine uses a two-phase binary search algorithm rather than a single guessing pass. For lossy formats (JPEG and WebP), the algorithm first tests quality settings across up to 16 binary search iterations while keeping full native resolution intact.
If a photo is visually intricate and cannot reach your requested limit at full resolution even at the minimum quality floor (0.01), the search engine initiates a second binary search phase. This second phase scales dimensions down, searching across 14 scale steps down to 1% of the original width and height, until the file size constraint is met.
For PNG outputs, browser canvas encoders treat PNG as strictly lossless. Because quality parameters are ignored by canvas PNG encoders, the tool achieves target kilobyte thresholds on PNGs exclusively by scaling down dimensions.
| Portal / Exam | Allowed Size (KB) | Format | Required Dimensions |
|---|---|---|---|
| UPSC Civil Services | 20 KB to 300 KB | JPG | 350 x 350 px minimum |
| SSC Combined Graduate Level | 20 KB to 50 KB | JPEG | 100 x 120 px to 240 x 320 px |
| IBPS Banking Exam | 20 KB to 50 KB | JPG | 200 x 230 px preferred |
| NTA NEET / JEE Main | 10 KB to 200 KB | JPG | Passport photo (4 x 6 inch postcard) |
| Passport Seva Kendra | Under 200 KB | JPG / PNG | 35 x 45 mm (413 x 531 px at 300 DPI) |
Source: Official Recruitment Notification Guidelines, checked October 29, 2026
Measured results: compressing a photographic image
We tested the compression engine in Chrome using a real 2048 x 1536 px smartphone photograph (sample-phone-photo.jpg, 2615.4 KB, captured on a Samsung phone at Prospect Park and released CC0). Running Target Size mode reliably produced outputs within budget across common application thresholds.
Targeting 100 KB yielded a 97.7 KB file (100049 bytes) at full 2048 x 1536 px resolution with quality calculated at 7.2%, while targeting 50 KB yielded a 43.5 KB file (44572 bytes) at quality 2.5%. At those low quality levels on a full-resolution photo, the JPEG encoder produces heavy block artifacts and visible pixelation. Targeting an aggressive 20 KB limit automatically scaled the canvas to 361 x 271 px with quality at 60.0%, producing a 19.1 KB file (19600 bytes) that fit securely beneath the 20 KB cap. Running Quality mode at the default 75% setting produced a 629.5 KB file (644623 bytes), representing a 75.9% reduction.
To preserve sharp details when aiming for a 50 KB cap, resize the photo before compressing: resizing this sample to 1200 px wide first (1200 x 900 px) and then targeting 50 KB produced a 48.8 KB file (49989 bytes, sample-compressed-1200px-50kb.jpg) at 10.3% quality, keeping text and edges noticeably cleaner than forcing full resolution into the same byte budget. For a 20 KB exam cap on a detailed photo, expect the image to scale down to about 361 px wide (361 x 271 px). All sample files and test outputs are preserved at reports/seo-batches/samples/b04/.
What happens to transparency during compression?
JPEG images do not have an alpha channel for transparency. When you compress a graphic with a transparent background to JPEG, the engine paints a solid white (#ffffff) background behind your artwork before encoding.
This prevents dark artifacts or black bounding boxes around cutouts and icons. If your project requires a transparent backdrop, select PNG or WebP as the export container. To isolate a subject from its background before compressing, use Remove Background.
Why does an aggressively compressed image look soft?
When you request a small kilobyte limit like 20 KB on a detailed camera photo, the engine must scale down the canvas once JPEG quality reaches its lower threshold. Scaling down discards high-frequency pixel details, making fine text or facial features look soft.
To preserve sharpness when meeting strict portal caps, crop out background clutter using Resize Image or crop the photo tightly around the subject first. If your file contains printed or handwritten notices, you can also extract the text using Image to Text (OCR), or generate an uncompressed static code with QR Code Generator.
Frequently asked questions
Can I compress an image to an exact KB number?
The tool searches for the highest quality that fits at or under your limit. Because lossy encoders group data in blocks, files land close to your target (such as 43.5 KB for a 50 KB target) without exceeding the ceiling.
How does PNG compression work in the browser?
Browser Canvas APIs treat PNG as strictly lossless, ignoring quality sliders. To meet a target kilobyte limit on PNGs, the tool proportionately downscales pixel dimensions while keeping colors and alpha transparency intact.
Are my photos uploaded to a remote server?
No. All decompression, search calculations, and re-encoding occur locally inside your web browser. Your photo bytes never leave your device.
Which image format produces the smallest file size?
WebP generally produces the most compact files for web graphics, often 25% to 35% smaller than JPEG at comparable visual quality. For older government portals, choose JPG for universal compatibility.
Can I compress multiple images at the same time?
Yes. You can select multiple images simultaneously. The compressor processes each file sequentially and lets you download individual files or a combined ZIP archive.
What is the upload size limit?
Each file can be up to 50 MB. Files exceeding 50 MB are skipped to prevent memory allocation crashes in your browser.
Guides and comparisons for this tool
- JPG vs PNG vs WebP for Form Uploads and Websites (Measured)
- How to Reduce a Photo to 20 KB Without It Going Blurry (Exam Form Uploads)
- Why Browser-Based File Tools Are More Private Than Cloud Processing
- How to Convert Apple HEIC Photos to JPG on Any Device
- HEIC vs JPG — Apple Format vs Universal Standard
- JPG vs PNG: Which Image Format Should You Use?

