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
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.

    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.

    → 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.

    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.

    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.

    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.

    → 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.

    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.

    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.

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