Compress to Size

Compress images to an exact target file size. Automatically finds optimal quality level. 100% private — all in your browser.

100% Private No Account Needed Runs in Your Browser

Drop an image here or click to browse

JPG, PNG, WebP

About Compress to Size

Uses binary search to find the optimal JPEG quality level that hits your target file size. Perfect for upload limits on social media, email, or forms.

Target File Size

Set an exact target in KB and the tool automatically finds the optimal JPEG quality level to hit your goal using binary search.

Smart Binary Search

Tests 12 quality levels in milliseconds to zero in on the perfect balance between file size and visual quality.

100% Private

All compression happens in your browser via HTML Canvas. Your images never leave your device — perfect for sensitive content.

Upload Limit Ready

Compress images to meet strict size limits for email attachments, social media uploads, online forms, and job applications.

📋 Common Use Cases

Form and Application Limits

Compress a photo to exactly stay under a 500KB or 2MB upload limit on job applications, insurance forms, or visa submissions.

Email Attachment Constraints

Shrink images to precisely fit under email server attachment limits without guessing at quality settings.

CMS Upload Restrictions

Meet CMS or website backend file size limits by targeting the exact maximum allowed size for image uploads.

Print Service Requirements

Prepare images that meet specific file size requirements from online print services for photo books or prints.

🪜 How to Use This Tool

  1. Upload your image
    Select the JPG, PNG, or WebP image you need to fit within a specific size.
  2. Enter target size
    Type the maximum file size in KB that your image must stay under.
  3. Auto quality optimization
    The tool automatically adjusts compression quality to get as close as possible to your target size.
  4. Download compressed image
    Save the result and verify the final file size meets your requirement.

📚 Related Guides

Frequently Asked Questions

Is this image tool really free?
Yes. Every image tool is completely free. No signup, no account, no payment. All processing happens in your browser.
Are my images uploaded to a server?
No. All image processing happens locally in your browser. Your images never leave your device. This is especially important for sensitive photos, IDs, and personal documents.
How does the AI background remover work?
It uses the @imgly/background-removal library running an IS-Net neural network entirely in your browser via WebAssembly. First use downloads a ~10MB model (cached for future visits). No image data is sent to any server.
What file formats are supported?
JPEG, PNG, WebP, SVG, GIF, BMP, and HEIC. Conversion between all formats is supported. AI features work on JPEG and PNG inputs.
What is the maximum image size?
Images up to ~4000x4000px process smoothly on modern devices. Very large images may be slower. For batch processing, up to 20 images at a time is recommended.

🔗 Related Tools

Image To SVG Image To Text PNG To WebP Image Upscaler