Compress Your Image to a Target File Size

Select an image, choose a maximum file size, and download the result.

Your images are processed in your browser. Up to 20 files at once Unlimited batches
Choose Image

or drag and drop here

Supports JPEG, PNG, WebP, AVIF, HEIC · Max 20 MB per file · Up to 20 files

More formats ▸

    How It Works

    Select your image

    Choose a JPEG, PNG, WebP, AVIF, or HEIC file from your device.

    Set a target size

    Pick a preset or enter a custom maximum file size in KB or MB.

    Compress

    The tool searches for the best quality that fits under your limit — entirely in your browser.

    Download

    Preview the result and download when satisfied.

    FitPhotoKB Browser Extension

    Right-click any image on the web to compress it instantly — no need to save it first. Free for Chrome, Microsoft Edge, and Firefox. Installation guide

    File Size vs. Dimensions

    File size depends on both image dimensions and compression quality. A large image at high quality produces a large file. Reducing dimensions or quality reduces file size.

    Why Small Targets Reduce Quality

    Compressing to a very small target forces the encoder to discard detail. The result may look blurry or blocky. Use the largest target your portal allows.

    JPEG, WebP, and AVIF

    WebP typically achieves smaller files at similar quality compared to JPEG. AVIF achieves even smaller files — up to 50% smaller than JPEG at the same quality. However, not all portals accept WebP or AVIF. JPEG is universally supported.

    PNG Transparency and JPEG

    PNG supports transparency. JPEG does not — transparent areas are filled with a solid background color when converting. WebP and AVIF both support transparency and do not require a background fill.

    Local Browser Processing

    All compression happens in your browser using standard web APIs. Your image is never sent to a server by this tool.

    Why a Portal May Still Reject Your File

    Upload portals may check dimensions, format, aspect ratio, or content policies — not just file size. This tool controls only file size.

    What to Do When the Target Cannot Be Reached

    Enable dimension reduction, switch to WebP or AVIF output which typically achieve 30-50% smaller files than JPEG, increase the target size, or accept that the image may not be compressible to that target without unacceptable quality loss.

    Keep Your Original

    Always keep a copy of your original image. JPEG, WebP, and AVIF compression is lossy and irreversible. PNG output is lossless — every pixel is preserved exactly.

    Reduce AI Vision API Token Costs

    AI vision APIs charge per token. Image tokens are calculated from image dimensions — larger images cost more to process. Enabling dimension reduction when compressing gives the greatest token savings. Compressing your images before sending them to GPT-4 Vision, Claude, Gemini, or any other AI vision API reduces token consumption and lowers your API costs. FitPhotoKB compresses images to any target size in your browser before you use them in your AI workflow.

    Not sure what JPEG, WebP, AVIF, lossy, or lossless mean?

    See the image compression glossary →

    Frequently Asked Questions

    How do I compress an image to a specific file size?

    Select your image, click the target size button (20 KB, 50 KB, 100 KB, 200 KB, 500 KB, 1 MB, or Custom), then click Compress. The tool automatically finds the best quality that fits under your chosen limit. Download the result when done.

    How do I reduce photo size for a passport, visa, or government portal upload?

    Check your portal exact requirement before compressing — every portal specifies a different size limit. Once you know the required size, select your photo, choose that target using the presets or Custom option, and click Compress. The tool works entirely in your browser. For a full guide including US visa, UK visa, and common upload errors, see How to Compress a Passport Photo for Online Applications.

    → Compress your image now
    Can I compress an image before sharing on WhatsApp or Instagram?

    Yes. Compressing before sharing reduces upload time and data usage. Both WhatsApp and Instagram recompress images on their own servers, so the final quality the recipient sees is also affected by the platform. Use the Custom option to set any target size you need. For tips on pre-compressing for WhatsApp, Instagram, and other platforms, see Why WhatsApp and Instagram Ruin Your Photo Quality.

    Does compressing an image reduce its quality?

    JPEG, WebP, and AVIF compression is lossy — some quality is lost. The tool shows a visual quality score after compression so you can see exactly how much quality was affected. For small targets, quality loss will be visible. For larger targets, the difference may not be noticeable — depending on the original image size and content.

    Can I compress multiple images at once?

    Yes. You can compress up to 20 images at once. Drag and drop multiple files or select them together using your file picker. All files are compressed with the same settings. Each file gets its own Download button.

    Is my image uploaded anywhere?

    No. All processing happens in your browser. Your image never leaves your device.

    What if the target cannot be reached?

    First enable "Resize image if needed" in Advanced options — this allows the tool to reduce dimensions until the file fits. If the target is still not reached, increase the target size or switch to WebP or AVIF output, which typically achieve 30-50% smaller files than JPEG at the same quality.

    Is this tool free? Are there any limits?

    Completely free with no monthly limits. You can compress as many images as you want. No account required. Limits: 20 files per batch, 20 MB per file, and 25 megapixels per image. The 25 megapixel limit covers all standard phone cameras — a typical phone photo is 12-16 megapixels. Professional DSLR images shot in ultra-high-resolution mode may exceed this limit.

    Can I compress a PNG?

    Yes. PNG input is supported. You can output as JPEG, WebP, AVIF, or PNG. For the smallest file size, JPEG or WebP output is recommended. PNG output uses lossless optimization — file size reduces but every pixel is preserved exactly.

    What happens to transparency?

    JPEG does not support transparency — transparent areas are filled with white. WebP, AVIF, and PNG output all preserve transparency without any fill.

    Why does the image look different after compression?

    JPEG, WebP, and AVIF are lossy formats. Compressing to a small target reduces quality. The smaller the target, the more quality is sacrificed. For website owners, image compression also directly affects Google rankings and page speed. How Image Compression Directly Impacts Your Site's Google Rankings.

    I compressed my photo but the portal still rejected it — why?

    Portals may check dimensions, format, aspect ratio, or content — not just file size. This tool only controls file size. For a full list of rejection reasons and fixes, see How to Fix “File Size Too Large” on Government and Job Portals.

    Can I use this tool to reduce AI image processing costs?

    Yes. AI vision APIs such as GPT-4 Vision, Claude, and Gemini calculate token costs based on image dimensions and size. Larger images consume more tokens and cost more. Compressing images before sending them to an AI API can reduce token consumption significantly. Use FitPhotoKB to compress to your required size before AI processing — entirely in your browser, no uploads required. For a detailed guide on reducing token costs across GPT-4 Vision, Claude, and Gemini, see How to Reduce Vision API Costs for GPT-4, Claude, and Gemini.

    → Compress your image now
    How do I compress an image before sending it to ChatGPT, Claude, or Gemini?

    Open FitPhotoKB, select your image, choose 200 KB as the target, and click Compress. Download the result and attach it to your AI prompt. AI vision APIs calculate token cost from image dimensions — enabling Resize image if needed gives the greatest token savings. A high-resolution photo resized and compressed to 200 KB can cost significantly fewer tokens than the original.

    What is AVIF and when should I use it?

    AVIF is a modern image format that typically achieves 20-50% smaller files than JPEG at similar visual quality, depending on image content. Use it when your portal accepts AVIF and you need the smallest possible file. Note: AVIF encoding is slower than JPEG in browsers — compression may take longer. For a full comparison of AVIF, WebP, and JPEG including when to use each, see WebP vs AVIF vs JPEG: Which Image Format Should You Use in 2026?.

    What is the difference between PNG output and JPEG output?

    PNG output is lossless — every pixel is preserved exactly, transparency is kept, and file size typically reduces 10-40% via compression optimization. JPEG output is lossy — smaller files but some quality is lost and transparency is not supported. Use PNG for logos, icons, and screenshots. Use JPEG or WebP for photographs. For a full guide on compressing PNG files including transparency, see How to Compress PNG Images Without Losing Transparency.

    Will metadata be preserved?

    Re-encoding can alter or remove metadata including EXIF data. Keep your original file if metadata matters.

    What do KB and MB mean here?

    KB means 1,000 bytes. MB means 1,000,000 bytes. This tool uses these definitions consistently for all calculations.

    Can I use this tool to compress a passport photo?

    Yes. Select your passport photo, choose the target size your portal requires (commonly 20 KB, 50 KB, or 100 KB), and click Compress. Check your portal requirements for both file size and minimum dimensions before uploading — most passport portals require at least 600×600 pixels. The tool shows output dimensions after compression so you can verify before downloading. Your photo is never uploaded to any server.

    → Compress your image now
    How do I compress an image to exactly 100 KB?

    Select your image, then click the 100 KB preset button. Click Compress — the tool automatically finds the highest quality that fits under 100 KB. If the result cannot reach 100 KB, open Advanced options and enable Resize image if needed, then compress again. Download when done. Your image is never uploaded to any server.

    How do I compress an image to exactly 200 KB?

    Select your image, then click the 200 KB preset button. Click Compress — the tool automatically finds the best quality under 200 KB. For photos being sent to AI vision APIs such as GPT-4 Vision, Claude, or Gemini, 200 KB is a practical target that significantly reduces token costs while keeping acceptable quality. If the result cannot reach 200 KB, enable Resize image if needed in Advanced options. Your image never leaves your browser.

    How do I compress an image without uploading it to a server?

    FitPhotoKB compresses entirely in your browser using WebAssembly — your image never leaves your device. Select your image, choose a target size, and click Compress. No upload, no account, no server.

    How does FitPhotoKB compare to TinyPNG, Squoosh, and iLoveIMG?

    FitPhotoKB is a free, browser-based image compressor that lets you set an exact file size target and automatically finds the best quality that fits under your limit. Your photos never leave your device.

    FeatureFitPhotoKBTinyPNGSquooshiLoveIMG
    Compress to exact file sizeYesNoNoNo
    Images stay on your deviceYesNoYesNo
    Batch compression20 files, unlimited, freeLimited (free tier)No batchLimited (free tier)
    Multi-language supportYesNoNoYes
    Free with no account requiredYesLimited (free tier)YesLimited (free tier)
    Can I convert a WebP image to JPEG?

    Yes. WebP input is fully supported. Select your WebP file, choose JPEG as the output format, set your target size, and click Compress. This is useful when sharing images with older devices or uploading to portals that do not accept WebP. You can also convert WebP to PNG if you need lossless output.

    How do I convert HEIC photos from my iPhone to JPEG?

    Select your HEIC photo, choose JPEG as the output format, set your target size, and click Compress. HEIC input is supported on Chrome 117+, Edge 117+, and Safari. If you are using Firefox, open this page in Chrome or Safari instead. Your photo is processed entirely in your browser — never uploaded to any server. For a full guide including batch conversion and browser support, see How to Batch Compress iPhone HEIC Photos to JPEG Online.

    Can I convert an AVIF image to JPEG?

    Yes. AVIF input is supported. Select your AVIF file, choose JPEG, WebP, or PNG as the output format, set your target size, and click Compress. This is useful when you need to share AVIF images with devices or portals that do not support the format yet.

    Can I reduce image dimensions to make the file smaller?

    Yes. Enable Resize image if needed in Advanced options. The tool automatically reduces dimensions when needed to reach your target file size. You can also set a specific maximum width in the Advanced options. Images are never upscaled — dimensions are only reduced when necessary for compression.

    Can I compress HEIC photos from my iPhone?

    Yes. HEIC input is supported on Chrome 117+, Edge 117+, and Safari. You can convert HEIC to JPEG, WebP, AVIF, or PNG for smaller file sizes or wider compatibility. Note: Firefox does not support HEIC — use Chrome or Safari instead.

    Can I convert a JPEG to PNG?

    Yes. Select your JPEG file, choose PNG as the output format, set your target size, and click Compress. PNG output is lossless — every pixel is preserved exactly. Note: Converting JPEG to PNG will not restore quality lost in the original JPEG compression, but it allows you to edit the image further without additional quality loss.

    Can I compress a WebP image?

    Yes. WebP input is fully supported. Select your WebP file, choose your preferred output format (JPEG, WebP, AVIF, or PNG), set your target size, and click Compress. WebP output typically achieves 25-35% smaller files than JPEG at the same visual quality.

    What is WebP and when should I use it?

    WebP is a modern image format developed by Google that typically achieves 25-35% smaller files than JPEG at similar visual quality. Use WebP when you need smaller file sizes and your target platform supports it. All modern browsers support WebP. Choose JPEG instead if you need universal compatibility with older devices or portals.

    Is there a browser extension for FitPhotoKB?

    Yes. FitPhotoKB is available as a free browser extension for Chrome, Microsoft Edge, and Firefox. Right-click any image on a webpage to load it directly into the compression popup — no need to save the image to your device first. See FitPhotoKB Browser Extension — Right-Click to Compress Any Image for full installation instructions.

    What can I do with the FitPhotoKB browser extension?

    The extension adds two options to the right-click menu on any image. 'Compress with FitPhotoKB' loads the image into the extension popup immediately — on Firefox, click the extension icon in your toolbar if the popup does not open automatically. 'Add to FitPhotoKB batch' queues the image silently — right-click several images to queue them all, then click the extension icon to open the popup with every queued image loaded. All compression runs 100% locally in your browser.

    Does the browser extension upload my images anywhere?

    No. The extension processes everything locally. When you right-click an image, the extension's background process fetches it — it has permission to make cross-origin requests to any domain, which the extension popup on its own does not — stores it temporarily in browser memory, and passes it to the compression popup. This background step is needed because images from other websites cannot be read directly by the extension popup otherwise. No image data is ever sent to any server. See FitPhotoKB Browser Extension — Right-Click to Compress Any Image for full details.

    Don't see your question here? Send me a message

    Looking for step-by-step guides? Visit the FitPhotoKB Blog.