Image compressor online — shrink JPEG and PNG with quality control and before/after size stats

Use this free online image compressor to reduce JPG and PNG file size before you publish to the web, send email attachments, or upload to a CMS. Pick JPEG output with an adjustable quality slider for photographs and screenshots where small artifacts are acceptable, or PNG for lossless re-encoding when you need sharp edges on UI captures. The tool shows original vs compressed bytes, side-by-side previews, copy-to-clipboard stats (with the copy icon), and a download button—everything runs locally in your browser using the Canvas API, so files are not uploaded to our servers. Pair this workflow with the image resizer when you need different pixel dimensions, the image format converter for WebP targets, and the image to Base64 tool when an API or HTML template expects inline data. Browse all file and data tools for CSV utilities, hashes, and SVG cleanup.

Drag and drop an image here, or use . JPEG and PNG are ideal; WebP and other raster types work if the browser can decode them.

No image loaded yet. Upload a JPEG, PNG, or other browser-supported raster image to compare size before and after compression.

Processing stays in your browser. JPEG export blends transparent pixels against white. For exact byte-level workflows, verify hashes with the file hash checker.

Why compress images for the web, email, and product uploads

Large photos and retina screenshots inflate page weight, slow Largest Contentful Paint (LCP), and cost mobile users data. Marketing teams hit attachment limits in email; developers exceed CMS upload caps. An image size reducer helps you hit engineering and design budgets without opening desktop apps. This page focuses on client-side JPEG compression with a clear quality control and honest byte counts so you can decide when the trade-off is worth it.

Searchers often look for compress JPG online, PNG optimizer, or reduce photo MB size. In the browser, PNG compression without third-party codecs is fundamentally different from JPEG: standard canvas PNG export is lossless, so dramatic savings usually come from choosing JPEG for photographic content or from specialized offline tools. Here you get transparent numbers: if PNG grows, switch to JPEG or lower the quality slider until the preview still looks acceptable.

How to use this image compressor (step by step)

  1. Click Upload image (with the upload icon) or drag a file into the dashed drop zone. JPEG and PNG are the primary workflows; other raster types work when the browser can decode them.
  2. Under Output format, choose JPEG to enable the quality slider (40–100%). Choose PNG when you need lossless output—there is no quality dial for PNG in the standard Canvas API.
  3. Compare the original and compressed preview panels and read the byte summary. Use Copy stats to paste before/after sizes into tickets, or Download to save *-compressed.jpg or *-compressed.png.
  4. If the compressed file is larger than the original (common for already-optimized JPEGs or certain PNGs), try a lower JPEG quality, or resize dimensions with the image resizer before compressing again.

JPEG quality, transparency, and when PNG still wins

JPEG uses lossy compression: lowering quality removes high-frequency detail. That is ideal for camera photos and noisy screenshots. PNG is lossless and supports alpha, which matters for logos, diagrams, and UI with transparency. When you export JPEG from a transparent PNG, this tool composites against a white background—standard for quick web workflows. For EXIF and camera metadata without re-exporting pixels, open the image metadata viewer.

SEO, Core Web Vitals, and caching keywords teams search for

Publishing blogs, landing pages, and docs with unoptimized hero images hurts Core Web Vitals and crawl budgets when HTML is bloated with inline assets. Use this compressor for quick checks, then ensure your CDN or framework serves responsive widths and modern formats where supported. Validate HTTP behavior with our HTTP header checker and redirect chain checker when debugging image URLs in production.

Integrity, SVG, and vector workflows

After you download compressed binaries, verify checksums with the file hash checker when pipelines require proof of file identity. For SVG icons and illustrations, raster compression does not apply—use the SVG optimizer to minify XML and reduce path bloat instead.

Related file and media tools

Explore the full file and data tools section. Highlights:

  • CSV Viewer & EditorOpen CSV as a sortable, filterable table, tweak cells, and export without a spreadsheet app.
  • CSV DeduplicatorRemove duplicate rows by chosen columns to clean mailing lists and product feeds.
  • CSV to SQL ConverterGenerate INSERT statements from a CSV for quick database seeding and migrations.
  • Image to Base64 ConverterEncode images to Base64 data URIs for embedding in HTML, CSS, or API payloads.
  • Image ResizerResize by pixels or percentage in the browser—privacy-friendly, no server upload required.
  • Image Format ConverterConvert between JPG, PNG, and WebP locally to match CMS, email, and performance needs.
  • Image Metadata ViewerInspect EXIF: camera, lens, GPS, dimensions, and exposure—great for photographers and forensics.
  • File Hash CheckerCompute MD5, SHA-1, and SHA-256 hashes of uploads to verify downloads and integrity.
  • SVG OptimizerMinify and clean SVG markup to cut file size for icons, illustrations, and inline graphics.

Frequently asked questions

Is this image compressor free and private?
Yes. Compression uses the Canvas API inside your browser tab. Files are not uploaded to our servers, and you can disconnect from the network after the page loads if you want an extra air gap for sensitive screenshots.
Why does JPEG compression have a quality slider but PNG does not?
JPEG is a lossy format: lowering quality removes detail to shrink file size. Standard HTML5 canvas PNG export is lossless—there is no quality dial in the browser API. Choosing PNG re-encodes the image without adding JPEG-style artifacts, which can still change size slightly (for example by stripping metadata) but will not match the dramatic savings you get from lowering JPEG quality.
Will my transparent PNG stay transparent after compression?
If you export as PNG, transparency is preserved when the browser composites onto the canvas. If you export as JPEG, transparency is not supported—semi-transparent areas are typically blended against a white background before encoding, which is how most client-side JPEG workflows behave.
How much smaller will my files get?
It depends on the source. Photos and noisy screenshots usually shrink a lot as JPEG at 70–85% quality. Already-optimized JPEGs may change only slightly. PNG screenshots of UIs sometimes grow when re-saved as PNG; for maximum byte reduction on photographic content, compare JPEG output sizes.
Does this replace ImageOptim, Squoosh, or a CDN image optimizer?
This tool is ideal for quick, local checks and one-off exports without installing software. Dedicated desktop apps and WASM codecs (for example WebP/AVIF with advanced settings) can squeeze out more bytes. For production sites, also use responsive images, caching, and a CDN—see our website tools for headers and redirects.
What is the maximum file size?
Very large images may hit browser memory limits. The tool applies a soft cap with a clear error message so the tab stays responsive. For huge assets, resize first using an image resizer, then compress.
Can I compress WebP or GIF inputs?
You can open many raster types the browser decodes (including WebP). Output is JPEG or PNG as you choose—convert WebP to JPEG for smaller photos, or to PNG when you need lossless edges. Animated GIFs are not preserved; only the first frame would be used if the browser decodes the file as a static bitmap.
How is this different from the image resizer or Base64 converter?
The resizer changes pixel dimensions; this page changes encoder settings and format to reduce bytes at the same dimensions. The image-to-Base64 tool encodes bytes as text for HTML or APIs—it does not optimize file size. Use compress → then Base64 if you need both smaller binaries and inline strings.