Compress images without changing their format or dimensions
This compressor accepts one JPG, PNG, or WebP image, redraws its pixels locally in your browser, and re-encodes it in the same format at the same pixel dimensions; PNG is reduced to an indexed colour palette because browsers cannot write lossy PNG. It does not impose a fixed byte limit, but large pixel dimensions can exceed the browser's available decode or Canvas memory. The image file is not uploaded to FiloTool for compression. Canvas re-encoding does not preserve source metadata. Animated images are not supported as animations; only the browser-decoded still frame is processed.
Example compression results
Compression results vary by image content, format, source encoding and selected setting. These Smart-mode examples use reproducible synthetic test images from FiloTool's test suite, measured in Playwright Chromium on 2026-10-19. A retained original means the browser encoder did not create a smaller file.
| Example | Dimensions | Input | Setting | Output | Size change |
|---|---|---|---|---|---|
| Synthetic JPEG photo | 640 × 420 | 31.96 KB | Smart | 11.59 KB | 63.74% smaller |
| Text-heavy PNG screenshot | 640 × 420 | 7.34 KB | Smart | 1.10 KB | 84.97% smaller |
| Photo-like PNG with sensor noise | 480 × 320 | 305.39 KB | Smart | 74.47 KB | 75.62% smaller |
| Transparent PNG graphic | 480 × 360 | 32.62 KB | Smart | 7.54 KB | 76.89% smaller |
| Synthetic WebP photo | 640 × 420 | 12.65 KB | Smart | 5.19 KB | 59.01% smaller |
Method: Synthetic fixtures encoded and measured in bundled Playwright Chromium by running the production compressImageFile code at every preset. JPEG and WebP use Canvas lossy quality; PNG reduces the image to an indexed palette. The production original-file fallback is applied when a candidate is not smaller.
How each format behaves
JPEG/JPG: Quality, Smart and Extreme use lossy qualities 0.88, 0.78 and 0.55. Photos often tolerate lower quality differently from screenshots or small text. Repeated JPEG encoding can add visible blocks, ringing or softness.
PNG: Canvas has no lossy PNG option, so FiloTool reduces the image to an indexed palette: 256 colours for Quality, 128 for Smart and 48 for Extreme, with dithering to soften gradients. Transparency is preserved. Images that already use few colours convert without any visible change; photographs and gradients trade fine colour detail for size, so inspect the result before replacing your file.
WebP: The tool uses lossy WebP qualities 0.86, 0.66 and 0.44. Transparency can be preserved, but animation is not. Results depend strongly on the source WebP's existing encoding.
When compression may not help
An already heavily compressed image, a very small file, an efficiently encoded WebP, or a high-quality setting may leave little room to shrink. A small, already-indexed PNG can also re-encode to the same size or larger. When the candidate is not smaller, FiloTool returns the original instead of presenting a negative saving as success.
A useful three-step check
- Add a supported image and note its dimensions and original size.
- Start with Smart; choose Quality for more detail or Extreme for stronger lossy compression.
- Compare the original and result, then inspect text, faces, gradients, sharp edges and transparency before replacing your file.
Compress, resize or convert?
Compression aims to reduce bytes without changing format or dimensions. Resize an image to change pixel dimensions, often the largest saving for oversized photos. Convert its format when JPG, PNG or WebP is a better match for the content. Format-specific controls are also available in the JPG, PNG and WebP compressors.
Choose a format before compressing
Review FiloTool's measured image format comparison and the practical JPG, PNG, and WebP guide, then test your own file.
Frequently asked questions
Does the compressor change the image format?
No. JPG remains JPG, PNG remains PNG, and WebP remains WebP. Use Image Converter when changing formats is the goal.
Why did my download not get smaller?
If re-encoding produces a larger file, FiloTool returns the original instead. A JPG or WebP that was already saved at a quality below the selected level is the usual cause; it cannot shrink further without a visibly lossier setting, resizing or a format change.
How does PNG compression work here?
Browser Canvas can only write lossless 32-bit PNG, which rarely beats an already-optimised file. FiloTool instead reduces the image to an indexed palette of 256, 128 or 48 colours (Quality, Smart, Extreme), with dithering and transparency preserved. Images that already use few colours, such as simple screenshots, convert to a palette with no visible change; photographic or gradient-heavy PNGs can show banding or grain at lower levels.
What do the JPG and WebP levels change?
They use progressively lower encoder quality settings. Stronger compression can reduce file size but may soften fine texture, introduce blocks, or create halos around sharp edges.
Are images uploaded?
No. The current JPG, PNG, and WebP workflow decodes and re-encodes the image in your browser.