Skip to content

Free Image Compressor — JPG, PNG, WebP & AVIF

Compress still images locally with quality or decimal-KB targets, optional resizing and ZIP export. No image file is uploaded.

DeveloperUpdated November 3, 2026

Your Inputs

Processed locally in this browser · never uploaded

Files are decoded and encoded on this device. Animated images and HEIC/HEIF are rejected rather than flattened or mislabeled.

Smaller fileMore detail
Output formatiKeep original format is the default. Auto explicitly compares formats this browser can encode and preserves alpha. Every downloaded file's extension comes from its actual MIME type.
Target size & resize optional
Target per image

1 KB = 1,000 bytes. Quality is searched from 1–100 for each selected output; a miss is labeled.

Resize before compressioniDownscaling often saves more than codec quality. Images are never enlarged, and a larger re-encoded result never replaces the original.

Re-encoding strips EXIF and other embedded metadata. Originals kept for no-gain results retain their original bytes and metadata. ZIP files are assembled on this device.

Your images stay on this device

Add one or several still images to compare actual input/output bytes and dimensions. Nothing is uploaded.

What this calculator does

Compress still JPG, PNG, WebP, AVIF and GIF images on your device. Compare real input and output bytes, set a decimal-KB target, resize without enlarging, and download one file or a genuine ZIP—without sending the images to Swiftly.

Figures this model assumes

Sources & method →
  • 01Target units: 1 KB = 1,000 bytes
  • 02Batch limits: 50 files, 50 MB each and 100 megapixels
  • 03PNG8 palette: 16 to 256 colors, depending on quality
  • 04ZIP export: duplicate-safe names and no server assembly

The complete guide

Image Compression: Formats, Targets & Metadata

Updated November 3, 2026

01What changes when you compress an image

Lossy encoding discards some image information so the remaining data can be stored more compactly. Lossless encoding preserves the decoded pixels, but it cannot promise a smaller file—especially when the source is already optimized. Quality numbers are encoder settings, not universal visual-quality scores, and the same number is not equivalent across JPG, WebP, AVIF or different implementations.

PNG output in this tool uses palette quantization with 16 to 256 colors. That can work well for some graphics, but it can also change gradients, text edges, colors and soft transparency. Auto compares the formats available in your browser, checks every output pixel for transparency before admitting JPG, and keeps the original bytes when every tested re-encode is larger.

The batch gauge measures byte reduction only. It does not certify sharpness, color accuracy or visual quality.

  • Quality mode applies the selected setting when no byte target is active.
  • Target mode searches quality settings and labels a target miss instead of hiding it.
  • Auto compares actual output sizes; it does not assume one format always wins.
  • A no-gain result downloads the original bytes rather than a larger “compressed” file.

02Choose JPG, PNG, WebP or AVIF for the actual image

JPG is widely supported but cannot hold transparency. PNG can preserve exact pixels in its full form, while this tool’s PNG8 output deliberately reduces the palette. WebP and AVIF can encode photographs and transparency, but available encoders and decoding support depend on the browser. The tool verifies the returned MIME type, so an unsupported request cannot silently become PNG bytes with a WebP or AVIF extension.

There is no honest universal percentage by which WebP beats JPG or AVIF beats WebP. Image content, dimensions, encoder settings and implementation all matter. Compare the preview at the size where people will see it, then keep the smallest result that remains acceptable for that use.

  • Photos for broad compatibility: test JPG, WebP and AVIF where supported.
  • Graphics with transparency: test WebP, AVIF or PNG and inspect edges closely.
  • Archival or pixel-exact work: retain the master; this compressor is not a lossless archival workflow.
  • Still GIF input can be converted; animated GIF, WebP, APNG and AVIF sequences are rejected without flattening frames.

03Compress to 50 KB, 100 KB or another decimal target

Open “Target size & resize” to choose a preset or enter a custom ceiling. This tool uses decimal units: 1 KB equals 1,000 bytes, so a 100 KB target means 100,000 bytes. That convention matches many upload forms, but a particular form may use a different rule or count an entire multipart request rather than only the file.

For a selected output format, the encoder first tests the floor and then searches quality settings for a result at or below the ceiling. With Auto, the smallest tested result that fits is selected. If quality alone cannot fit, optional dimension fallback tries smaller dimensions. If the ceiling remains unreachable, the result says so; it never swaps the byte unit or pretends an oversized file met the target.

A byte target is a size constraint, not a visual-quality guarantee. Inspect the result before replacing the source.

04Resize for the display, not just the codec

Dimensions and compression solve different problems. Re-encoding changes how pixels are stored; resizing changes how many pixels exist. If an image will only appear in a small container, delivering a much larger raster can waste transfer and decoding work. Choose a maximum width, height or longest side, or use a percentage preset. The tool only shrinks and never enlarges an image.

For a responsive site, generate the sizes your layout actually needs and use width and height attributes plus an appropriate srcset and sizes declaration. A single “best width” cannot fit every layout, device pixel ratio or art-direction choice. Also remember that reducing dimensions can remove detail needed for zoom, cropping or print.

05Metadata, orientation and local processing

A newly encoded canvas file does not carry forward EXIF or other embedded source metadata. That can remove camera details and location fields, but it also removes metadata you may need for rights, provenance or archival work. When the compressor keeps the original because re-encoding offers no gain, it keeps the original bytes and their metadata too; the interface states which case occurred.

Image files are decoded and encoded in the browser rather than uploaded to Swiftly. The page, scripts and dynamically loaded codecs still need to be available, so “local processing” is not a promise that a first visit works offline. After the necessary assets have loaded, some operations may continue without a network; codec availability still varies by browser.

06Limits, animation and final quality checks

The batch accepts up to 50 still images, 50 MB per file and 100 megapixels per decoded image. These are product safety limits, not guarantees that every device has enough memory. Very large images can hit a lower browser canvas or memory ceiling; in that case the tool reports an error instead of leaving a permanent loading skeleton.

Animated formats are rejected during signature inspection so the tool cannot silently return only their first frame. HEIC and HEIF are not accepted. Before publishing a compressed result, inspect fine text, faces, gradients, transparent edges and saturated colors at the intended display size. Keep the original master and repeat the check after any further resize, format conversion or content-management-system optimization.

Frequently asked

Image Compressor FAQ

13 answers

The tool does not send your image files to Swiftly for compression. Decoding, resizing, encoding and ZIP assembly run in your browser. Loading the page and its codec assets is separate from image processing and may require a network connection.

Lossless re-encoding preserves decoded pixels but may not make the file smaller. JPG, lossy WebP, lossy AVIF and this tool’s PNG8 palette output can discard information. Keep the original and inspect the result; no quality number can guarantee an invisible change for every image and display.

The target is decimal: 100 KB means 100,000 bytes. The tool searches encoder quality settings for a file at or below that ceiling. In Auto it selects the smallest tested result that fits. Optional dimension fallback can try smaller images, and any remaining miss is labeled.

A format may be too inefficient at the requested dimensions, or the ceiling may be unusually small. Try Auto, another format, or enable dimension fallback. If every re-encoded result would be larger than the source, the tool keeps the original and reports the miss rather than returning a larger file.

Transparency is preserved in PNG, WebP and AVIF outputs when those encoders are available. Auto scans all output pixels for alpha before considering JPG. PNG8 quantization can still change soft alpha and colors, so inspect transparent edges rather than treating transparency support as proof of identical appearance.

No. Animated GIF, WebP, APNG and AVIF sequences are rejected before compression. The tool does not flatten them to a first frame or return a static file without warning. Still GIF files can be converted to another supported raster format.

No. HEIC and HEIF are outside this tool’s supported input set. Convert a copy to JPG, PNG or WebP in an application you trust, then compress that copy. Keep the original if you need its metadata or archival fidelity.

A newly encoded output does not carry forward EXIF or other embedded metadata. An original kept for a no-gain result is the unchanged source file and therefore retains its metadata. The result card distinguishes these cases.

Some processing can continue after the page and required codec assets have loaded, but a first visit and dynamically loaded components may need the network. Browser codec support also differs. Treat offline use as a capability to test in your browser, not a universal guarantee.

Already optimized files, format conversion and palette encoding can all produce a larger result. This tool compares actual bytes and keeps the original when the tested output is not smaller, so a no-gain download is deliberately the unchanged source rather than a larger re-encode.

Each ready image is written as a real binary ZIP entry on your device. Entries use stored compression because the images are already compressed, and duplicate filenames receive unique suffixes case-insensitively. Files with errors are not included.

Properly sized images can reduce transfer work and may help page experience metrics such as Largest Contentful Paint, but results depend on the whole page and connection. Compression alone cannot guarantee rankings or clicks. Also use correct dimensions, responsive sources, descriptive alt text and an appropriate loading strategy.

There is no universal best number. Start with a preview, compare artifacts and file size at the intended display dimensions, and adjust from there. Quality values are not directly comparable across formats or encoder implementations; a byte target is also not a quality score.

Related searches

Keep calculating

All 24 tools
Works EverywhereResponsive on any device
100% PrivateMath never leaves your browser
Always FreeNo sign-up, no paywall

Swiftly calculations are educational estimates generated from published 2026 tax brackets, Federal Reserve rate data and state-level averages. They are not an offer of credit, tax advice or a guarantee of terms. Confirm results with a licensed lender, CPA or advisor before making financial decisions.