Image Compressor
Image Compressor redraws the first selected image to canvas and exports JPEG at the entered quality, defaulting to 82. An optional width resizes proportionally before encoding. The output always uses JPEG regardless of source, so transparency is lost and line art may acquire artifacts; file size is not targeted or guaranteed.
Runs locally — files stay on your deviceWhat does quality 82 mean?
It is a browser encoder hint of 0.82, not a promised visual score or exact compression ratio.
Lossy compression trades pixel fidelity for fewer bytes
JPEG transforms and quantizes image blocks. Re-encoding discards information, and repeated generations can accumulate visible artifacts.
How it works
Choose an image, optional output width, and quality from 1–100. The browser decodes, scales proportionally, draws to canvas, and requests an image/jpeg Blob.
Key concepts
Dimensions and encoding both affect size
Reducing width can save more than a small quality adjustment.
Transparent pixels need a matte
JPEG has no alpha; canvas export commonly composites transparency against black unless a background is drawn.
When to use it
- Reduce photographic image bytes.
- Resize a photo while exporting JPEG.
- Create a lighter copy for non-archival delivery.
When not to use it
- Do not use it for transparency.
- Do not expect an exact target size.
- Do not overwrite the only high-quality original.
Worked examples
Large photo
- Input
4000 px photo, width 1600, quality 82- Expected output
1600 px-wide JPEG
Height follows the original ratio.
No width
- Input
Width empty- Expected output
Original pixel dimensions
Only re-encoding occurs.
Transparent logo
- Input
PNG with alpha- Expected output
JPEG without alpha
Transparent areas cannot remain transparent.
Common mistakes
Assuming lower quality means exact KB
Complexity and browser encoder determine size. Correction: Generate and inspect the actual output.
Compressing text screenshots heavily
Edges can blur and ring. Correction: Compare PNG or WebP.
Discarding the original
Lossy output cannot restore removed detail. Correction: Keep a master copy.
Best practices
- Resize before aggressively lowering quality.
- Compare at 100% zoom.
- Keep originals and record output dimensions.
Related operations and differences
Image Resizer
Choose Image Resizer when you need to resize images to exact dimensions locally.; use Image Compressor specifically for image.
Add Text Watermark to Image
Choose Add Text Watermark to Image when you need to place a text watermark in the lower-right corner.; use Image Compressor specifically for image.
Flip Image Horizontally
Choose Flip Image Horizontally when you need to mirror an image from left to right.; use Image Compressor specifically for image.
Flip Image Vertically
Choose Flip Image Vertically when you need to mirror an image from top to bottom.; use Image Compressor specifically for image.
JPG to PNG
Choose JPG to PNG when you need to convert JPG images to PNG locally.; use Image Compressor specifically for image.
PNG to JPG
Choose PNG to JPG when you need to convert PNG images to compact JPG files.; use Image Compressor specifically for image.
Limitations and privacy
- Always outputs JPEG.
- No target-byte mode, preview, batch, chroma control, metadata preservation, or quality metric.
- Browser encoder results vary.
Selected images are decoded and processed locally in this browser.
Frequently asked questions
Is output always JPEG?
Yes.
Does it preserve transparency?
No.
Can I target 200 KB?
No.
Is quality loss reversible?
No.