Image Compressor
Choose a target and try a bounded set of JPEG or WebP encodes. Check the measured size and whether the target was met.
How to compress an image
- Select one local JPEG, PNG or WebP up to 20 MB. Generated output is still; animation is not preserved.
- Enter a whole-number target in kB, choose JPEG or WebP, and optionally allow smaller dimensions. One kB is 1,000 bytes.
- Compress, review the preview, dimensions and measured size, then download. If the original already fits in the selected format, no new file is made.
What a target size means
The target is an upper byte limit, not a promise. The tool tries a fixed set of quality settings and selects the first measured fit, not necessarily the best possible encoding.
Dimensions remain unchanged unless smaller dimensions are allowed. The original size is tried first; smaller sizes preserve the aspect ratio to the nearest pixel without cropping or enlargement.
JPEG and WebP are lossy. JPEG places transparency on white; WebP can retain it. Inspect the preview: output may look different or be larger than the original.
If no attempt fits, the smallest measured retained attempt is labelled above target. Browser encoders and image content affect the result.
Reading the size results
A 500 kB target means 500,000 bytes: exactly 500,000 fits, but 500,001 does not.
A 2,000,000-byte original and 500,000-byte output differ by 75%; this is not a guaranteed saving.
With smaller dimensions allowed, 4,000 × 3,000 can be tried at 3,200 × 2,400, 2,560 × 1,920 and 2,048 × 1,536.
Limitations
A target may be unattainable. Lossless output, color fidelity, exact size and acceptance by an upload service are not guaranteed. Keep the original.
Output is a still JPEG or WebP without the original animation or metadata record. This is not a forensic metadata sanitizer; GIF, HEIC, AVIF, SVG, batch processing and PNG optimization are not supported.
Local processing
The tool processes your image in your browser without tool-added uploads, saved history or image-bearing links. Downloads occur on request; normal site services and consent remain separate.
Image compression questions
Sources
Native browser encoders use tested quality settings; actual bytes and format support vary by browser.
- developer.mozilla.orgMDN: createImageBitmap
- developer.mozilla.orgMDN: canvas toBlob
- html.spec.whatwg.orgHTML standard: image bitmaps and animation
Checked 2 November 2026.
Related tools
SVG to PNG
Convert a local SVG file or pasted markup into PNG, with explicit dimensions, transparency and bundled fonts.
Open tool — SVG to PNGCSS Filter Generator
Order and repeat CSS effects, compare a specimen and copy the exact filter declaration.
Open tool — CSS Filter GeneratorFluid Font Size Calculator
Create root-relative CSS from viewport endpoints and inspect the copied size model.
Open tool — Fluid Font Size CalculatorCSS Button Generator
Style native button states, inspect keyboard focus and copy HTML and CSS.
Open tool — CSS Button GeneratorCSS Border Radius Generator
Edit eight corner radii, preview a box and copy CSS in pixels or percentages.
Open tool — CSS Border Radius GeneratorCSS Grid Generator
Build a bounded CSS Grid example with editable tracks, placement and named areas. Preview it, copy CSS or HTML and download the same standalone example.
Open tool — CSS Grid GeneratorCSS Flexbox Generator
Build a Flexbox example with container and item controls, explicit layout axes, matching CSS and HTML, and a local complete-example download.
Open tool — CSS Flexbox GeneratorCSS Text Shadow Generator
Build ordered text shadows, preview plain text and copy exact CSS.
Open tool — CSS Text Shadow GeneratorCSS Transform Generator
Compose repeatable 2D CSS transforms, edit px or percentage translation and origin, inspect a reference box and copy the exact current declarations.
Open tool — CSS Transform GeneratorCSS Box Shadow Generator
Create ordered CSS box-shadow layers with a live preview and copyable code.
Open tool — CSS Box Shadow GeneratorImage Watermark
Add a text or logo watermark to a batch of images, review each result and download individual files or a ZIP.
Open tool — Image WatermarkCSS Gradient Generator
Create linear or radial CSS gradients with editable colors, opacity and stops.
Open tool — CSS Gradient GeneratorColor Converter
Convert supported sRGB HEX, RGB and HSL literals with alpha, explicit precision and current code Copy.
Open tool — Color ConverterImage to Text (OCR)
Recognize printed text in local PNG or JPEG images, choose a language and review or correct the result before copying or downloading.
Open tool — Image to Text (OCR)QR Code Reader
Read one QR code from a local PNG or JPEG and inspect its text or content bytes without opening links.
Open tool — QR Code ReaderColor Contrast Checker
Compare foreground and background colors, adjust opacity and check WCAG numerical contrast thresholds for text and essential interface details.
Open tool — Color Contrast CheckerPrint Size & Resolution Calculator
Calculate print dimensions, required pixels and effective PPI with fit or crop.
Open tool — Print Size & Resolution CalculatorAspect Ratio Calculator
Find a width-to-height ratio or calculate a matching pixel size from one target dimension.
Open tool — Aspect Ratio CalculatorHEIC to JPG
Convert supported HEIC photos locally into full-size JPG copies, with quality and background controls and verified individual or ZIP downloads.
Open tool — HEIC to JPGImage Converter
Convert supported PNG, JPEG and WebP images locally with batch targets, transparency, background and quality controls, then review and download the encoded files.
Open tool — Image ConverterPhoto Collage Maker
Arrange local photos in a grid, adjust crops and spacing, and download PNG or JPEG.
Open tool — Photo Collage MakerRotate & Flip Images
Rotate or mirror a local batch of static PNG, JPEG and WebP images, then review and download the processed results.
Open tool — Rotate & Flip ImagesImage Cropper
Crop one local JPEG, PNG or WebP to exact pixels with visual and numeric controls. Download PNG or JPEG.
Open tool — Image CropperImage Resizer
Resize a JPG, PNG or WebP image by pixels or percentage, preview the result and download it.
Open tool — Image Resizer