WebToolsHub Logo
WebToolsHubOnline Tool Suite

Image Resizer & Compressor

Need to compress image to 20KB for a government form? Resize a photo to exact pixel dimensions for a passport or exam application? This free tool does it all in your browser, privately, with no file uploads to any server. Set a target size like 20KB, 50KB, or 100KB, pick an exam preset (UPSC, SSC, FPSC, NTS, and more), or enter custom pixel dimensions and get your perfectly sized image in seconds.

What Is This Image Resizer & Compressor?

This is a free, browser-based tool that lets you reduce image size in KB to an exact target for example, compress image to 20KB, compress image to 50KB, or compress image to 100KB without installing any software. You can also resize image dimensions in pixels and convert between JPEG, PNG, and WebP formats. Everything runs client-side in your browser, which means your photos are never uploaded to a server, never stored, and never seen by anyone but you.

Whether you are filling a government job application form that demands a photo under 20KB, applying for a Pakistani passport with a 2×2 inch photo requirement, or just want to make a JPEG smaller without visible quality loss this tool handles all of it in a few clicks. One tool, every image task covered.

Why Do Government & Exam Forms Demand Such Small Image Sizes?

If you have ever tried to upload a photo for an UPSC, SSC, IBPS, RRB, FPSC, PPSC, NTS, or CSS exam form, you already know the frustration: your phone camera produces a 3–5 MB photo, and the portal flatly refuses anything above 20KB or 50KB. Why?

Government portals were often built years ago with limited server storage budgets, and the file-size limits were set conservatively to keep database sizes manageable across millions of applicants. The limits have stuck around even as broadband has improved, because changing a live portal's validation rules risks breaking the entire application system. The result is that students in India and Pakistan who file millions of exam applications every year need a reliable way to compress image to 20KB without making the photo look like it was faxed in 1998.

This is exactly the gap this tool fills. The binary-search compression engine tries up to 8 quality levels in milliseconds and picks the highest quality that still stays within your chosen KB target. For most photos, the difference between the original and the compressed version is invisible to the naked eye.

How to Use This Tool - Step by Step

  1. Upload your image. Click the upload box, drag and drop a file onto it, or press Ctrl + V to paste a screenshot directly from your clipboard. JPEG, PNG, and WebP are all supported.

  2. Choose your method - Preset or Manual.

    • Exam Preset (fastest): Click the exam or form that applies to you for example, UPSC Photo, SSC Signature, FPSC Passport, or NTS Form. The tool automatically sets the correct pixel dimensions and KB target for that specific requirement. No guesswork needed.

    • Manual Settings: Enter a custom width and height in pixels. Toggle the aspect ratio lock on or off. Choose your output format (JPEG for government forms, WebP for web use). Then either drag the quality slider or type a target KB size such as 20, 50, or 100.

  3. Check the live before/after preview. The panel on the right shows your original image and the processed result side by side. The file sizes (for example, 2.1 MB → 18 KB) and pixel dimensions update in real time so you can confirm the result before downloading.

  4. Download or copy. Click Download Image to save the file to your device. Click Copy PNG to copy it directly to your clipboard for pasting into a form or document.

Exam & Government Form Presets - India and Pakistan

Getting the exact photo size wrong even by 1KB can get your application rejected outright. To make this foolproof, the tool includes one-click presets for the most common government exams and portal requirements in India and Pakistan.

🇮🇳 India Exam Presets

  • UPSC Civil Services Photo: 200×230 px, JPEG, max 40KB the standard for the IAS/IPS preliminary and mains applications.

  • UPSC Signature: 140×60 px, JPEG, max 20KB.

  • SSC (CGL / CHSL / MTS) Photo: 200×240 px, JPEG, max 50KB.

  • SSC Signature: 200×80 px, JPEG, max 20KB.

  • IBPS / SBI Bank Exam Photo: 200×230 px, JPEG, max 50KB covers PO, Clerk, and SO applications.

  • IBPS Signature: 140×60 px, JPEG, max 20KB.

  • RRB (Railway) Photo: 200×230 px, JPEG, max 40KB.

  • NEET Photo: 3.5×4.5 cm equivalent, JPEG, max 200KB.

  • JEE (Main) Photo: 3.5×4.5 cm equivalent, JPEG, 10–200KB.

🇵🇰 Pakistan Exam Presets

  • 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 Form Photo: 200×200 px, JPEG, max 50KB.

  • CSS Competitive Exam Photo: 2×2 inch (192×192 px at 96dpi), JPEG, max 50KB.

For Pakistani passport and visa applications that require a 2×2 inch photo, use the CSS preset or manually set 400×400 px with a 50KB target. There is currently almost no competition for Pakistan-specific image resizing guidance online, so if you are preparing for an exam, this is the most accurate preset source available.

How the KB Target Compression Works

When you set a target size say, compress image to 20KB the tool does not just guess a quality level and hope for the best. It uses a binary search algorithm that works like this:

  1. It tries quality 50 first and checks the resulting file size.

  2. If the file is too large (above 20KB), it tries quality 25.

  3. If quality 25 produces a file that is too small (good, more room), it tries quality 37.

  4. This narrows down in up to 8 iterations, converging on the highest quality that keeps the output at or below your target.

The result: you always get the best possible quality within your size limit not just "something small enough." This is why photos compressed with this tool tend to look noticeably better than photos run through a tool that just applies a fixed quality setting of, say, 30%.

Important note about PNG and target size: PNG is a lossless format there is no quality slider to adjust. If you need to hit a specific KB target (like 20KB), you must use JPEG or WebP. The tool will warn you if you select PNG with a KB target enabled, because it cannot compress a lossless file to an arbitrary size. For government forms, JPEG is almost always the correct format anyway.

Resize Image to Exact Pixel Dimensions

Beyond KB compression, this tool also works as a full pixel resizer. If you need to resize image to 200×230 pixels for UPSC, or scale a banner down from 1920px to 800px wide, you can enter exact dimensions in the width and height fields.

Toggle the aspect ratio lock to control how the resize behaves:

  • Locked (default): Change the width, and the height adjusts automatically to maintain the original proportions. No distortion.

  • Unlocked: Set width and height independently. Useful when a portal requires a specific non-proportional crop, like a 200×80 px signature area.

After resizing, you can still apply a KB target on top for example, resize to 200×230 px AND compress to under 40KB in a single step.

Format Conversion - JPEG, PNG, WebP

You can convert between the three most common image formats in one step:

  • JPEG: Best for photographs and government form uploads. Smaller file sizes, adjustable quality. Almost all exam portals accept JPEG only.

  • PNG: Best for screenshots, diagrams, and images with transparent backgrounds. Lossless cannot be compressed to an arbitrary KB target, but you can resize dimensions.

  • WebP: Best for web use modern format that produces files 25–35% smaller than JPEG at the same visual quality. Use this for websites, not government forms (most portals do not accept WebP yet).

If you work with WebP images for your website, you may also find our Image to WebP Converter useful it is purpose-built for bulk WebP conversion with quality control. And if you want to understand the technical differences between formats before choosing, our blog post WebP vs AVIF: Which Format Wins in 2026? breaks it down thoroughly.

Client-Side Processing - Your Images Never Leave Your Device

This is not a marketing claim it is a technical fact. This tool uses the browser's Canvas API and JavaScript Blob API to perform all compression and resizing directly in your tab. No file is ever transmitted to a server. No data is logged. When you close the tab, the image is gone.

Why does this matter? Government ID cards, passport photos, academic certificates, and bank documents are exactly the kind of sensitive files that should never be uploaded to a random third-party server. With this tool, that concern does not apply because there is no server involved.

This approach also makes the tool fast. There is no upload/download round trip, no queue, no waiting for a server to process your file. It runs at the speed of your device's CPU, which for a typical image is well under a second.

Photo Size Reducer Without Losing Quality - Is It Really Possible?

Yes. within limits. "Reduce image size in KB without losing quality" is one of the most searched phrases in this category, and for good reason: nobody wants a blurry passport photo. Here is the honest answer:

For large targets (100KB, 200KB): Virtually no visible quality loss is possible for most photos. A modern smartphone photo at 5MB compressed to 100KB at the right quality setting looks essentially identical to the original on screen.

For small targets (20KB, 50KB): Some quality loss is unavoidable for high-resolution source images. However, the binary-search algorithm in this tool picks the highest possible quality level that stays within your limit so the loss is minimized compared to tools that use a fixed, aggressive quality setting. For a photo that will be viewed at 200×230 pixels on a portal, the quality is more than sufficient.

Practical tip: If your source image is already small (e.g., 300×300 px), hitting a 20KB target with good quality is easy. If your source is a 4000×3000 px DSLR photo, resizing the dimensions first (to roughly 400×500 px) and then applying the KB target will always produce a better-looking result than compressing a massive image without resizing it.

JPG Size Reducer - Quick Guide for Common File Sizes

Here is a reference for the most common compression targets and what they look like in practice:

  • Compress image to 20KB: Suitable for government form signatures, thumbnails, and low-res passport photos. At 200×230 px source, quality typically stays above 60%, which is more than sufficient for form uploads.

  • Compress image to 50KB: The sweet spot for most Indian exam portals (IBPS, SSC, RRB) and Pakistani exam bodies (FPSC, NTS). At this size, a 400×500 px photo looks clean and sharp on screen.

  • Compress image to 100KB: Used for higher-resolution requirements (NEET, JEE, some state PSC forms). Very little noticeable compression at this target the photo looks nearly original.

  • Compress image to 200KB: Common for college and university admission portals. At this size, the photo is practically indistinguishable from the original for most source files.

You can also read our in-depth guide on image optimization best practices and our guide on why JPG and PNG are being replaced for web use if you want to go deeper on the technical side.

Resize Image for Passport - 2×2 Inch Format Guide

The standard 2×2 inch passport photo format is required for:

  • Pakistani passports and visa applications

  • US visa applications (including at the Pakistani embassy)

  • CSS (Central Superior Services) competitive examination forms

  • CNIC (Computerized National Identity Card) renewal in Pakistan

At 96 DPI (standard screen resolution), 2×2 inches equals exactly 192×192 pixels. At 300 DPI (print quality), it equals 600×600 pixels. For digital online submissions, 192×192 to 400×400 px is the right range. Use the CSS preset in this tool, or manually set 400×400 px with JPEG format and a 50KB target.

For Indian passport photo requirements, the standard is a 2-inch × 2-inch color photo with a white background, submitted as JPEG between 10KB and 1MB. The NTS preset in this tool is also compatible with most Indian passport portal requirements.

Mobile-Friendly - Works on Android and iPhone

The majority of students filling government exam forms in India and Pakistan do so on a mobile phone. This tool is built mobile-first: the layout adjusts for small screens, the file picker works with the phone's gallery and camera, and the before/after preview is scrollable on a small display.

On Android, you can take a photo with your camera and open it directly with this tool from the browser's file picker. On iPhone, you can do the same and also use the Paste from Clipboard feature if you have taken a screenshot.

Common Mistakes to Avoid

  • Choosing PNG when you need a KB target: PNG is lossless and cannot be compressed to an arbitrary size. If the form requires a file under 20KB or 50KB, always use JPEG or WebP. The tool will warn you if you try this combination.

  • Not resizing dimensions before compressing: Compressing a 4000px wide photo to 20KB applies extreme compression to a large canvas — you get a blurry result. Resize the dimensions to roughly the display size first (e.g., 300×400 px), then apply the KB target. You will get a much better-looking output.

  • Ignoring the aspect ratio warning: Government form portals often specify exact pixel ratios (e.g., 200×230 px, which is not square). If you lock the aspect ratio and resize only the width, the height will adjust proportionally and might not match the required ratio. For preset dimensions, always use the provided exam presets which unlock aspect ratio automatically.

  • Using a photo with a dark or busy background: Many exam portals require a white or light background. This tool resizes and compresses photos it does not remove backgrounds. For background removal, use a dedicated tool first, then compress here.

  • Uploading an already-heavily-compressed image: If you upload a photo that has already been compressed to 25KB and then try to compress it further, the results will look degraded. Always start with the highest-quality original you have.

Related Tools You Might Find Useful

If you are working with images for a website or a Next.js project, you might also want to check out our Image to WebP Converter it converts JPEG and PNG files to WebP format, which loads 25–35% faster on modern browsers. Our blog post Why You Must Convert JPEG to WebP in 2026 explains the performance and SEO benefits in detail.

For developers building image-heavy web applications, our article on bulk image to WebP conversion covers automated workflows. And if you want to understand WebP quality settings before optimizing your site's images, our WebP quality settings guide is the most thorough resource available.

Understanding Image File Size - A Practical Explainer

Many people are confused about why image files are the sizes they are. Understanding this helps you make better decisions when compressing photos for forms.

A digital image is essentially a grid of pixels. Each pixel stores color information in a standard photo, this means a red value, a green value, and a blue value, each from 0 to 255. An uncompressed 200×230 pixel photo therefore contains 200 × 230 × 3 = 138,000 bytes of raw data approximately 135KB. But a JPEG of the same dimensions is typically only 15–40KB. How?

JPEG compression works by:

  • Dividing the image into 8×8 blocks and analyzing the frequency of color changes within each block.

  • Applying a Discrete Cosine Transform (DCT) to separate each block into frequency components essentially, separating fine detail from broad color areas.

  • Quantizing the high-frequency detail away at higher quality settings (like quality 80), only fine detail in areas the human eye is very sensitive to is removed. At lower quality settings (like quality 20), more detail is discarded, resulting in visible blurring and "blocking" artifacts.

This is why a JPEG at quality 75 looks nearly identical to the original, but at quality 10 it looks like a mosaic. The binary-search engine in this tool exploits this relationship: it finds the quality level where the compressed output is just under your KB target, giving you the clearest possible photo at that file size.

Reduce Image Size in KB - Industry Benchmark Table

Here is a practical reference showing typical compressed file sizes for a standard passport-sized photograph (200×230 px) at different JPEG quality levels. Use this to set realistic expectations before compressing:

  • Quality 90 (Near lossless): ~80–120KB Looks identical to original. Too large for most exam portals.

  • Quality 75 (High quality): ~40–60KB Very clean, slight detail reduction invisible without zooming. Good for NEET, JEE portals.

  • Quality 60 (Medium quality): ~25–40KB Looks excellent in practice. Suitable for UPSC, SSC, IBPS, RRB requirements.

  • Quality 45 (Acceptable quality): ~15–25KB Minor artifacts at 100% zoom, but looks fine at normal viewing size. Works for 20KB targets.

  • Quality 30 (Low quality): ~10–18KB Noticeable blurring, blocking artifacts visible. Only use as a last resort if quality 45 still exceeds the target.

In most real-world cases, a well-lit phone photo compressed to 20KB at 200×230 px lands somewhere between quality 45–60, which is perfectly acceptable for government portal submissions. Poorly lit or noisy photos compress less efficiently and may drop to quality 30 in which case, taking a better source photo will yield a noticeably better compressed result.

Why Use WebToolsHub for This?

There are many image resizer tools online. Here is what makes this one different:

  • No file upload, no privacy risk: Everything runs in your browser. Your photos are never transmitted anywhere.

  • Binary-search compression for best quality: You get the best possible image quality within your KB limit not just "not enough."

  • Accurate exam presets: The UPSC, SSC, IBPS, FPSC, NTS, and CSS presets are based on the actual requirements published by these bodies not approximations.

  • No account, no login, no watermarks: Free with no strings attached. Download as many images as you want.

  • Works offline after first load: Once the page is loaded, you can disconnect from the internet and the tool still works because there is no server dependency.

Frequently Asked Questions

How do I compress an image to 20KB online for free?

Upload your image to this tool, select JPEG as the format, and type 20 in the 'Target KB Size' field. The tool uses a binary-search algorithm to find the highest quality setting that keeps the file at or below 20KB all in your browser with no uploads. For best results, resize the pixel dimensions to roughly 200–400 px wide before applying the 20KB target.

Can I compress image to 20KB without losing quality?

Partial quality loss is unavoidable at very small file sizes, but this tool minimizes it by finding the optimal JPEG quality level through a binary search rather than blindly applying a low quality setting. For a 200×230 px photo destined for a government exam form, the output at 20KB looks perfectly acceptable on screen. The key tip: resize the dimensions to the display size first, then apply the KB target this gives you the best quality-to-size ratio.

What image size is required for UPSC exam forms?

UPSC requires a recent color passport photo at 200×230 pixels in JPEG format, with a file size between 20KB and 50KB. The signature must be 140×60 pixels in JPEG, between 10KB and 20KB. This tool includes a one-click 'UPSC Photo' preset that sets these exact dimensions and a target KB automatically.

What photo size is required for FPSC and NTS forms in Pakistan?

FPSC (Federal Public Service Commission) typically requires a 200×200 pixel JPEG photo under 50KB. NTS (National Testing Service) similarly requires a 200×200 px JPEG under 50KB. CSS (Central Superior Services) exam requires a 2×2 inch photo (192×192 px at screen resolution) in JPEG under 50KB. This tool has presets for all three click the relevant button and your dimensions and target size are set automatically.

Does this tool send my photo to a server?

No. This tool processes everything entirely inside your browser using the Canvas API and JavaScript. Your image is never uploaded to any server, never stored in a database, and never transmitted over the network. Once you close the tab, the image is gone. This makes it safe to use for sensitive documents like government IDs, passport photos, and exam application materials.

Why does PNG not work with the KB target option?

PNG is a lossless image format unlike JPEG, there is no quality slider to reduce file size. You can resize a PNG to smaller pixel dimensions, but you cannot compress a lossless file to an arbitrary KB target. If you need a specific size like 20KB or 50KB, switch the format to JPEG or WebP. Government exam portals almost always require JPEG anyway.

How do I resize an image for a 2x2 inch passport photo?

A standard 2×2 inch passport photo for online submissions is 400×400 pixels at 96 DPI (or 600×600 px at 300 DPI for print). In this tool, use the 'CSS Exam Preset' button, or manually set width and height to 400, make sure the aspect ratio lock is off, select JPEG format, and set a target of 50KB. For Pakistani CNIC, US visa, and CSS exam requirements, these settings are exactly correct.

What is the difference between resizing and compressing an image?

Resizing reduces the pixel dimensions for example, from 4000×3000 px to 400×300 px. This makes the image physically smaller. Compressing reduces the file size in KB or MB by lowering the quality level of a JPEG, without necessarily changing the dimensions. For government forms, you usually need to do both: resize to the required pixel dimensions (e.g., 200×230 px) AND compress to the required KB limit (e.g., under 50KB). This tool does both in a single step.

Can I use this tool on my phone to resize photos for exam forms?

Yes. This tool is fully mobile-friendly and works on Android and iPhone browsers (Chrome, Safari, Firefox). You can open your phone's gallery through the file picker, select a photo, and the tool will compress and resize it in your browser. You can also paste screenshots directly using the clipboard paste feature if your mobile browser supports it.

What is the best image format for government exam portals - JPEG or PNG?

JPEG is almost always the correct choice for government exam portals. JPEG produces smaller files at acceptable quality levels typically 10–100KB for a passport-sized photo. PNG is lossless and much larger in file size, and most Indian and Pakistani government portals either reject PNG outright or only list JPEG/JPG in their accepted format requirements. Use JPEG for any form submission.