How to Compress Image to 20KB, 50KB, or 100KB - Complete Guide (2026)
Author
Muhammad Awais
Published
June 6, 2026
Reading Time
14 min read
Views
22k

The 20KB Wall - Why Government Portals Are So Strict
You've spent 20 minutes filling out an UPSC application form. You upload your photo taken specifically for this, good lighting, white background and the portal throws you out: "File size exceeds 20KB limit." Your phone camera produced a 3.5MB JPEG. The portal wants 20KB. That's a 175× reduction.
This happens to literally millions of students every exam season in India and Pakistan. IBPS PO, SSC CGL, RRB NTPC, FPSC CSS, NTS every major government recruitment portal has these brutal file size limits. And the frustrating part is, most online "compressors" either don't let you target a specific KB, or they destroy the photo quality in the process.
This guide covers exactly how to compress image to 20KB, 50KB, or 100KB with maximum quality preserved using a method that works every time. I'll also explain why these limits exist, what actually happens to your photo during compression, and the one mistake most people make that results in a blurry mess.
How to hit a specific KB target (20KB / 50KB / 100KB) without guessing
The right order of steps resize dimensions first, then compress (this changes everything)
Exact specifications for UPSC, SSC, IBPS, RRB, FPSC, NTS, CSS exam forms
Why PNG doesn't work for KB targets and what to use instead
How to compress a photo on mobile without installing any app
Why Your 3MB Photo Needs to Become 20KB - The Real Reason
Government exam portals in India and Pakistan were built during a time when server storage was expensive and internet speeds were slow. The 20KB and 50KB limits were set conservatively to keep their databases manageable across crores of applications. These limits have barely changed even though broadband is now widespread because updating a live government portal's validation rules risks breaking the entire application system.
The result: every UPSC, SSC CGL, IBPS PO, RRB NTPC, FPSC, or NTS applicant has to manually compress their photo before uploading. Multiply that by the number of exam applicants UPSC alone gets 500,000+ applications per cycle and you can see why "compress image to 20kb" is one of the most searched queries in India every year.
Understanding this context matters because it tells you what the actual goal is: you don't need a high-resolution beautiful photo. You need a clearly identifiable face photo at a small file size. The verifier looking at your form is checking that the photo matches your ID they're not critiquing the compression artifacts.
The Fastest Way: Use an Online Tool That Targets KB Directly
Most people try random online compressors and hope the output is below 20KB. That's a coin flip. The right approach is to use a tool that lets you set the target size enter "20" and it delivers a file at or below 20KB, at the highest possible quality.
Our free Image Resizer & Compressor does exactly this. Here's the step-by-step process:
Open the tool and upload your photo. You can drag and drop, click to browse, or press
Ctrl + Vto paste a screenshot directly from your clipboard.Set the pixel dimensions first. This is the step most people skip and it's why they end up with blurry output. For UPSC, enter Width:
200, Height:230. For IBPS/SSC, enter200 × 230. For FPSC/NTS, enter200 × 200. Unlock the aspect ratio lock so you can set these independently.Select JPEG format. Not PNG. JPEG allows quality adjustment, which is what makes KB targeting possible. PNG is lossless and cannot be compressed to an arbitrary size.
Enter your target KB size. Type
20for a 20KB target,50for 50KB, and so on. The tool runs a binary search algorithm it tries different quality levels in milliseconds and picks the highest quality that fits within your limit.Check the before/after preview. The panel shows both the original and compressed photo side by side with file sizes. Confirm the output looks acceptable before downloading.
Download. Click Download Image and save the file. The filename will already be in JPEG format.
Everything runs inside your browser your photo never leaves your device. This matters when you're uploading government ID cards and passport photos. The tool uses the browser's Canvas API to process images entirely client-side.
The Correct Order of Steps - Most Tutorials Get This Wrong
Here's the thing I wish someone had told me earlier: always resize pixel dimensions before applying a KB target. The order matters enormously.
Think about it this way. Compressing a 4000×3000 pixel photo to 20KB is like squeezing a king-size duvet into a sandwich bag something has to give, and that something is image quality. The tool has to remove so much detail that the result looks blocky and blurred.
But if you first resize that 4000×3000 photo to 300×400 pixels the actual display size on the portal and then apply a 20KB target, the math changes completely. A 300×400 photo has far less raw data to start with, so hitting 20KB requires far less quality reduction. The output looks clean and sharp.
Wrong approach: Upload 4MB photo → Set 20KB target → Get blurry mess
Right approach: Upload 4MB photo → Resize to 200×230px → Set 20KB target → Get clean photo
This single change is why some people say "my photos always look bad compressed" and others say "I can barely tell the difference." It's not the tool it's the order of operations.
Exact Size Requirements for Every Major Exam - India and Pakistan
I've pulled these specs from official exam notifications. These are accurate as of June 2026, but always double-check the specific notification for the exam cycle you're applying to, as portals occasionally update their requirements.
🇮🇳 India Government Exam Photo Requirements
UPSC Civil Services (IAS/IPS): Photo — 200×230 px, JPEG, 20KB–50KB. Signature — 140×60 px, JPEG, 10KB–20KB.
SSC CGL / CHSL / MTS: Photo — 200×240 px, JPEG, max 50KB. Signature — 200×80 px, JPEG, max 20KB.
IBPS PO / Clerk / SO: Photo — 200×230 px, JPEG, 20KB–50KB. Signature — 140×60 px, JPEG, 10KB–20KB.
SBI PO / Clerk: Photo — 200×230 px, JPEG, 20KB–50KB. Same as IBPS format.
RRB NTPC / Group D: Photo — 200×230 px, JPEG, max 40KB. Signature — 140×60 px, JPEG, max 20KB.
NEET UG: Photo — 3.5×4.5 cm equivalent, JPEG, 10KB–200KB.
JEE Main: Photo — 3.5×4.5 cm equivalent, JPEG, 10KB–200KB. Signature — 3.5×1.5 cm, JPEG, 1KB–30KB.
State PSC forms (general): Most follow UPSC format — 200×230 px, JPEG, 20KB–50KB. Check individual notifications.
🇵🇰 Pakistan Government Exam Photo Requirements
FPSC (Federal Public Service Commission): Photo — 200×200 px, JPEG, max 50KB.
PPSC (Punjab Public Service Commission): Photo — 300×300 px, JPEG, max 100KB.
NTS (National Testing Service): Photo — 200×200 px, JPEG, max 50KB. As per the NTS official portal application guidelines.
CSS Competitive Examination (FPSC): Passport-size photo — 2×2 inch format (192×192 px at screen resolution, or 400×400 px recommended), JPEG, max 50KB.
CNIC Renewal (NADRA): Digital photo — minimum 600×600 px, JPEG, typically uploaded at higher quality.
For Pakistani passport and visa applications requiring a 2×2 inch photo, use 400×400 pixels at 50KB. This covers US visa applications at the Pakistan embassy, Saudi visa, and UAE visa photo requirements as well.
What Actually Happens When You Compress a JPEG
Understanding this will help you set realistic expectations and explain why some photos compress better than others.
JPEG compression works by dividing your image into 8×8 pixel blocks. Each block goes through a mathematical process called a Discrete Cosine Transform (DCT), which separates the block into frequency components roughly speaking, broad color areas (low frequency) and fine detail (high frequency). The compression algorithm then discards some of the high-frequency detail. At high quality settings, only the finest detail is removed. At low quality settings, more is removed, causing the characteristic "blocky" JPEG artifacts.
This is why photos with busy backgrounds trees, patterns, crowds compress worse than clean portrait photos. The algorithm has more detail to deal with, so hitting a small KB target requires removing more of it. A photo with a plain white background against a face will almost always compress to 20KB cleanly, because most of the image is a flat color that the algorithm can describe efficiently.
Practical insight: If your compressed photo looks blocky or blurry even after following the correct resize-first approach, try retaking the photo in front of a plain white or light-colored wall. The improvement can be dramatic.
Compressing Images for Government Forms on Mobile - No App Required
Most students filling exam forms are on Android or iPhone. The good news is you don't need to install anything the Image Resizer & Compressor tool works fully in mobile browsers (Chrome on Android, Safari on iPhone).
Here's the exact mobile workflow:
Open Chrome or Safari on your phone and go to the tool page.
Tap the upload area your phone's photo gallery will open.
Select the photo you want to compress.
Tap the relevant exam preset button (UPSC, SSC, FPSC, NTS, etc.) to auto-fill the correct dimensions and KB target in one tap.
Check the before/after preview. The compressed file size shows next to the output image.
Tap Download Image to save to your phone's downloads folder.
Upload this compressed file to the exam portal.
The exam preset buttons are the fastest path on mobile one tap sets the right dimensions, the right format (JPEG), and the right KB target for that specific exam. No manual typing needed.
Why PNG Doesn't Work for KB Targets - And What To Use Instead
This is the most common mistake I see. Someone uploads a PNG screenshot of their photo and tries to set a 20KB target. The tool either can't hit the target or the output quality is terrible. Here's why.
PNG is a lossless format. It doesn't have a quality slider. Every pixel in the output is mathematically identical to the input. There's no mechanism to discard detail which is exactly what you need to hit a specific KB target. You can make a PNG smaller by reducing its pixel dimensions, but you can't compress a lossless file to an arbitrary file size.
JPEG is a lossy format. The quality slider controls how much detail gets discarded. Quality 80 keeps most detail. Quality 20 keeps less. This is what enables hitting 20KB or 50KB targets you're trading some detail for file size reduction.
The rule is simple: For any government form or exam portal submission, use JPEG. Almost every portal explicitly lists JPEG (or JPG) in its accepted formats. PNG is for designs, screenshots, and images with transparency not passport photos.
WebP is also an option for website use it produces files 25–35% smaller than JPEG at the same visual quality. But most government portals don't accept WebP yet, so stick with JPEG for form submissions. If you work with website images, our Image to WebP Converter is useful for that separate use case.
Signature Compression - Often Overlooked, Just as Important
Most guides focus on the photo and ignore the signature. But UPSC, SSC, IBPS, and RRB all require a separate compressed signature image and the limits are even tighter: 10KB–20KB for a 140×60 pixel image.
Here's the workflow for signatures:
Sign on white paper with a black pen. Photograph it or scan it.
Upload the signature image to the tool.
Set dimensions to 140×60 px for UPSC/IBPS/RRB, or 200×80 px for SSC.
Select JPEG format.
Set target to 15KB this gives you a safe buffer below the 20KB limit.
Check the preview. The signature should be clearly legible on a white background.
Download and upload to the form.
One tip: photograph the signature in good light against a truly white background. A cream or off-white background will add color data that makes compression less efficient and the output look yellowish. Plain white gives the cleanest compressed result.
Image Compression and Website Performance - A Different Use Case
Government form compression and website image optimization are related but different problems. For forms, the goal is hitting a specific KB target for a single photo. For websites, the goal is serving the smallest possible images across all devices to improve load speed and Core Web Vitals.
If you're a developer or have a website, image optimization matters a lot for SEO. Google's PageSpeed Insights documentation consistently lists "serve images in next-gen formats" and "properly size images" as top recommendations. An unoptimized hero image can add 2–3 seconds to your LCP (Largest Contentful Paint) score which directly impacts rankings.
For website images, our guide on fixing Core Web Vitals for page speed covers the full optimization workflow. And if you're still serving JPEGs on your site in 2026, our article on why JPG and PNG are hurting your SEO explains exactly what format to move to and why.
The short version: for websites, convert to WebP. For government forms, use JPEG. Both are handled by the tools we've built.
5 Mistakes That Produce Bad Results - And How To Avoid Them
Compressing without resizing dimensions first. As covered above, this is the biggest one. Always set the pixel dimensions to the portal's required size before applying a KB target. The compression quality difference is night and day.
Uploading an already-compressed photo. If you downloaded your photo from WhatsApp, it's already been compressed once (WhatsApp compresses photos on send). Compressing it again forces the algorithm to work with degraded source data, amplifying artifacts. Always start with the original camera file.
Using a screenshot instead of the original file. Screenshots taken on a phone add a PNG layer on top of your photo and are often lower resolution than the original. Use the original camera file.
Choosing PNG format with a KB target. PNG is lossless KB targeting doesn't work. Switch to JPEG.
Uploading a photo with a dark or busy background. Busy backgrounds contain more frequency data, which makes compression less efficient. A plain white or light background compresses much more cleanly to 20KB.
Free vs Paid Compressors - Is There Any Difference?
Honestly? For the specific task of compressing a passport photo to 20KB or 50KB, no paid tools offer no meaningful advantage. The math of JPEG compression is the same regardless of what software does it. What matters is:
Can you set a specific KB target (not just a quality level)?
Does it resize dimensions in the same step?
Does it show a real before/after preview so you can verify quality?
Does it process files locally without uploading to a server (for privacy)?
The Image Resizer & Compressor on WebToolsHub covers all four and it's completely free. No account, no watermarks, no upload limits. The binary-search compression engine finds the optimal quality level automatically, so you don't have to guess.
The W3C accessibility guidelines also note that accessible tools should work without requiring downloads or installations which is exactly what browser-based tools accomplish.
Conclusion - Get It Right the First Time
Compressing a photo to 20KB, 50KB, or 100KB is not complicated once you understand two things: use JPEG (not PNG), and resize the pixel dimensions before applying the KB target. Follow those two rules and the output will look clean every time.
For government exam forms UPSC, SSC, IBPS, RRB, FPSC, NTS, CSS use the exam preset buttons in the tool. One click sets the correct dimensions and KB target for your specific exam. No guesswork, no rejected applications.
If you found this guide useful, bookmark the Image Resizer & Compressor tool for the next time an exam portal throws that "file size exceeded" error at you because it will happen again. And if you're working on website images and want to understand the full picture of modern image formats, the WebP vs AVIF comparison for 2026 is worth a read.
Frequently Asked Questions
How do I compress image to 20KB without losing quality?
First, resize your image dimensions to the required size (e.g., 200×230 px for UPSC). Then use a JPEG compressor with a specific KB target setting not just a quality slider. This two-step approach preserves as much quality as possible because you're working with a smaller pixel canvas. Our free tool handles both steps in one interface: set dimensions, then set 20KB as the target, and the binary-search engine finds the highest quality that fits within 20KB.
What size photo is required for UPSC exam?
UPSC Civil Services requires a recent passport-size photograph at 200×230 pixels in JPEG format, with a file size between 20KB and 50KB. The signature must be 140×60 pixels in JPEG format, between 10KB and 20KB. Both must be on a white background. Always verify the exact requirements in the official UPSC notification for your specific exam cycle, as minor updates do occur.
Can I compress a PNG image to 20KB?
Not by adjusting quality PNG is a lossless format with no quality slider. You can reduce a PNG's file size by making the pixel dimensions smaller, but you cannot compress it to an arbitrary KB target like 20KB the way you can with JPEG. For government form submissions, always convert to JPEG first, then apply the KB target. Almost all exam portals accept JPEG only anyway.
What photo size is needed for FPSC and NTS forms in Pakistan?
FPSC requires a 200×200 pixel JPEG photo under 50KB. NTS (National Testing Service) similarly requires a 200×200 px JPEG under 50KB. CSS competitive examination requires a passport-size photo 2×2 inch format, which is 192×192 px at standard screen resolution (or 400×400 px for better quality). PPSC requires 300×300 px under 100KB. These specifications are available on each organization's official portal and may be updated per exam notification.
How do I compress an image to 50KB for IBPS or SBI?
IBPS and SBI bank exams require a 200×230 pixel JPEG photo between 20KB and 50KB. Upload your photo to an image compressor, set dimensions to 200×230 px (unlock aspect ratio), select JPEG format, and set the target to 45KB a small buffer below 50KB to avoid any portal rounding issues. For the signature, use 140×60 px at a 15KB target. The process takes under 60 seconds using the preset buttons in our tool.
Does compressing an image multiple times damage quality further?
Yes. each time you compress a JPEG and then re-compress it, the quality degradation compounds. This is called "generation loss." WhatsApp, for example, compresses every photo you send so a photo forwarded through WhatsApp twice is already a second-generation JPEG. If you then compress it again for a form, you're working with degraded source data. Always start with the original camera file (not a screenshot, not a WhatsApp download) for the best compressed output.
Is the image compressor tool free? Do I need to create an account?
Yes, our Image Resizer & Compressor is completely free. No account, no sign-up, no watermarks, no usage limits. All processing happens inside your browser your image is never uploaded to any server. You can compress and download as many photos as you need, and close the tab when done. Nothing is stored anywhere.
Continue Reading
View All HubLevel Up Your Workflow
Free professional tools mentioned in this article
Markdown to HTML Converter
Convert Markdown to clean HTML instantly with live preview. Supports GitHub Flavored Markdown, tables, code blocks, and task lists. Free and browser-based.
JWT Secret Key Generator
Generate cryptographically secure, high-entropy JWT secret keys instantly. A free, client-side CSPRNG key generator for secure HS256 and HS512 tokens.
Image to WebP Converter
Convert up to 25 JPG, PNG, TIFF and BMP images to WebP with live before/after preview, smart resizing, and real-time savings metrics 100% client-side, nothing uploaded.
Advanced SEO Meta Tag & Open Graph Generator
Generate highly optimized meta tags, Twitter Cards, and Open Graph data for Google and Facebook with real-time visual previews.



