How to Compress JPEG: 6 Methods That Actually Work
If you need to compress JPEG files for a website, an email attachment, or just to claw back some disk space, you have more options than the average tutorial admits. Some are free and built into your operating system. Some are dedicated apps that batch hundreds of images in seconds. Some are command-line tools that fit into automated workflows. They produce noticeably different results.
This guide walks through six real methods to compress JPEG images, with step-by-step instructions for the three most common workflows, the quality settings that actually matter, and a comparison table so you can pick the right tool the first time.
What Is JPEG Compression?
JPEG is a lossy image format. When you save a JPEG, the encoder discards information that the human eye is unlikely to notice — fine textures in shadows, tiny color variations between adjacent pixels, high-frequency detail that disappears at normal viewing distances. The amount it discards is controlled by the quality setting (usually 0–100).
Higher quality means more detail preserved and a larger file. Lower quality means more aggressive discarding and a smaller file. There is no single "right" quality level — it depends on the image content, the display size, and how forgiving the viewer is. For most photographs displayed on a screen, quality 70–80 is visually indistinguishable from the original at less than half the file size.
This is fundamentally different from PNG, which is lossless. If you want a deeper comparison, see our note further down on JPEG vs PNG vs WebP.
Why Compress JPEG Files?
A few reasons people end up here:
- Web speed. Image weight is the biggest single contributor to slow page loads. Compressing JPEGs from 2 MB down to 200 KB can cut page load time by seconds, which directly affects bounce rate and SEO.
- Email attachments. Most providers cap attachments at 20–25 MB. A handful of camera JPEGs hits that fast.
- Storage and backups. A folder of 5 MB photos becomes a folder of 500 KB photos with no visible quality loss for most uses. Multiply by thousands and you reclaim real disk space.
- Upload limits. Government forms, job portals, and CMS uploads often enforce 100 KB to 5 MB caps. We have a dedicated guide for the strictest case: compress JPEG to 100KB.
- Faster sharing. Smaller files upload faster to Slack, Drive, Dropbox, and AirDrop.
If you only want a higher cap, see compress JPEG to 1MB. For a broader take on shrinking any image format, how to make image file size smaller covers the full landscape.
Method 1: Compress JPEG on Mac with Preview
Preview is built into every Mac and handles single-image JPEG compression without a download.
- Double-click the JPEG to open it in Preview
- Choose File > Export...
- Set Format to JPEG
- Drag the Quality slider — the file size estimate updates underneath
- Click Save
A quality setting around 60–75% works for most photos and produces files roughly half the original size. The slider is coarse, so try 50% first, then nudge up if the result looks off.
Pros: Free, no install, fast for one image. Cons: No batch mode, no precise file size target, limited control over chroma subsampling and metadata.
For more on the broader Mac workflow, see reduce image size on mac.
Method 2: Compress JPEG with Compresto (Batch, Native)
When you have more than a handful of images, opening each one in Preview gets old fast. Compresto is a native macOS app that batches JPEG, PNG, WebP, video, and PDF compression in one drag-and-drop window.
- Open Compresto
- Drag a folder or selection of JPEGs into the window
- Pick a quality preset (or set a custom value)
- Click Compress
Compresto uses MozJPEG-style encoding under the hood, which produces 10–20% smaller files than the standard libjpeg encoder Preview uses, at the same visual quality. Hardware acceleration means a folder of 200 photos finishes in seconds rather than minutes.
It also strips embedded metadata (EXIF, color profiles, thumbnails) by default — that alone can shave 50–200 KB off camera JPEGs without touching pixel data.
Pros: Batch processing, hardware-accelerated, native macOS, handles other formats too. Cons: Mac only.
For a wider look at apps in this space, see image compressor software.
Method 3: Compress JPEG in Photoshop
Photoshop gives you the most control over JPEG output, useful when you care about every kilobyte.
- Open your image in Photoshop
- Choose File > Export > Save for Web (Legacy) — or File > Export > Export As in newer versions
- Select JPEG as the format
- Adjust the Quality slider (0–100) and watch the file size estimate at the bottom-left
- Optionally toggle Progressive (loads in passes, slightly smaller file) and adjust Quality further
- Click Save
The "Save for Web" dialog is older but still the most precise — it shows the output file size in real time and lets you compare 2-up or 4-up previews at different settings.
Pros: Maximum control, side-by-side previews, fine-grained chroma subsampling settings. Cons: Requires a Creative Cloud subscription, slow for batches without Actions.
For non-destructive workflows, see compress image without losing quality.
Method 4: Compress JPEG Online (Squoosh, TinyJPG, Compressor.io)
When you only have one or two images and no software you want to install, browser tools work fine.
Squoosh (squoosh.app) is open-source from Google. Drag your JPEG in, pick MozJPEG as the codec, and adjust quality with a live before/after preview. Files never leave your browser — compression runs locally in WebAssembly.
TinyJPG (tinyjpg.com) auto-compresses with a single drop, typically reducing files 40–60% with no quality controls to fiddle with.
Compressor.io offers both lossy and lossless modes with a slider.
Pros: No install, work on any OS, free. Cons: Files upload to third-party servers (except Squoosh), free tiers cap file size and batch count, slower than native apps for large batches.
Method 5: Command Line with ImageMagick
For automation, scripts, or compressing thousands of images, ImageMagick is the standard.
Install on Mac with Homebrew:
brew install imagemagick
Compress a single JPEG to quality 75:
magick input.jpg -quality 75 output.jpg
Strip metadata and optimize:
magick input.jpg -quality 75 -strip output.jpg
Batch convert every JPEG in a folder, overwriting in place:
mogrify -quality 75 -strip *.jpg
Resize and compress in one pass (max width 1920px):
magick input.jpg -resize 1920x -quality 75 -strip output.jpg
Pros: Free, scriptable, handles enormous batches, works on every platform. Cons: Command-line only, no preview, requires care to avoid overwriting originals.
For lossless optimization on Mac specifically, jpegoptim is a lighter alternative:
brew install jpegoptim
jpegoptim --max=80 *.jpg
Method 6: Reduce Resolution Before Compressing
Often the fastest way to shrink a JPEG is to resize it. A 6000×4000 photo from a modern camera is roughly 24 megapixels — far more than any web display needs. Resize to 1920×1280 and the file shrinks dramatically before any quality compression happens.
Pixel count scales file size roughly linearly. Halving each dimension (e.g., 4000×3000 to 2000×1500) cuts pixel count by 75% and file size by a similar amount.
You can resize and compress in the same step in any of the methods above. For PNGs specifically, see how to resize PNG — the trade-offs are different.
Comparison Table: JPEG Compression Methods
| Method | Cost | Batch? | Best For | Typical Reduction |
|---|---|---|---|---|
| Preview (Mac) | Free | No | One-off Mac compression | 30–60% |
| Compresto | Paid (one-time) | Yes | Batch Mac workflows | 50–80% |
| Photoshop | Subscription | With Actions | Pixel-perfect control | 40–70% |
| Squoosh / TinyJPG | Free | Limited | Single images, any OS | 40–70% |
| ImageMagick | Free | Yes | Scripts, automation | 40–70% |
| Resize + recompress | Free | Yes | Massively oversized photos | 70–95% |
Tips for Better JPEG Compression
A few things that consistently make compressed JPEGs look better at smaller sizes:
Pick the right quality level. For photos, 70–80 is the sweet spot — visually identical to the original at typical viewing sizes. For thumbnails or images shown small, 50–60 works fine. Below 40, blocking and banding artifacts become visible.
Strip metadata. EXIF data, color profiles, and embedded thumbnails can add 50–200 KB to a camera JPEG with no visual benefit. Most tools strip metadata by default; ImageMagick needs -strip. If you need to preserve EXIF (for archiving, copyright, or geolocation), use a tool that lets you keep it explicitly.
Use MozJPEG when available. It's a drop-in replacement for the standard JPEG encoder that produces 10–20% smaller files at the same visual quality. Squoosh and Compresto use it by default.
Resize before compressing. If your image is bigger than its display size, resize first. There's no point storing 24 megapixels when the image will display at 1.2 megapixels.
Avoid recompressing. Every time a JPEG is re-saved, it loses a little more quality. Always start from the original (or a lossless source like PNG/RAW) when possible. For more on RAW, see raw image format explained.
Batch with care. When compressing folders, output to a separate directory or use a tool that creates copies. ImageMagick's mogrify overwrites originals — magick with explicit input/output paths is safer.
FAQ: Compress JPEG
How small can I compress a JPEG without losing quality?
For most photographs, you can reduce file size by 40–60% with no visible quality loss by saving at quality 75–85 and stripping metadata. Beyond that, some quality is being discarded — though it may still be invisible at normal viewing sizes. True lossless JPEG optimization (rearranging Huffman tables, stripping metadata) typically yields 5–15% reduction with zero pixel changes. Tools like jpegoptim --strip-all and ImageOptim do this.
What's the best JPEG quality for web?
Quality 75–80 is the standard recommendation for web JPEGs. It produces files small enough to load quickly (typically 60–80% smaller than quality 100) while remaining visually indistinguishable from the original on standard displays. For Retina or high-DPI displays, you can drop to 65–70 because pixel density hides minor compression artifacts.
How do I compress a JPEG to 100KB, 200KB, or 1MB?
The exact target depends on your starting point. For 100KB targets (passport photos, government forms), see compress JPEG to 100KB. For 1MB (web hero images, email attachments), see compress JPEG to 1MB. The general approach: resize to your needed dimensions first, then drop quality until you hit the target — usually quality 50–60 for 100KB, 70–80 for 1MB.
JPEG vs PNG vs WebP for compression?
JPEG is best for photos — lossy compression that removes imperceptible detail. Smallest files for photographic content. PNG is lossless and best for screenshots, logos, and graphics with sharp edges or transparency. PNGs of photos are typically 5–10x larger than JPEGs. WebP is a newer format that does both — lossy mode is 25–35% smaller than JPEG at the same quality, and it supports transparency. Browser support is now universal. If your platform supports WebP, use it. JPEG remains the safe default for maximum compatibility.
Does compressing a JPEG twice degrade it?
Yes. Every time a JPEG is re-saved, the encoder discards more information — this is called generation loss. The effect is small for the first few saves at high quality but accumulates. Best practice: keep the original, and always compress from the original rather than from a compressed copy. If you absolutely must recompress, use the highest quality setting that still meets your file size target.
Will compressing a JPEG remove EXIF data?
It depends on the tool. Compresto, ImageOptim, and ImageMagick with -strip remove EXIF by default. Photoshop's "Save for Web" lets you choose. Preview keeps EXIF unless you explicitly remove it. Stripping EXIF saves 50–200 KB and protects privacy (camera GPS coordinates, device serial numbers), but loses copyright tags and shoot metadata. If those matter, pick a tool that preserves them.
Can I compress JPEGs on iPhone?
Yes — the iOS Shortcuts app has a built-in Compress Image action. Create a shortcut that takes images from input, compresses them at 0.5–0.7 quality, and saves to Files or Photos. Third-party apps like Image Size and Compress Photos also work.
Compress JPEGs Faster on Mac
If you compress JPEGs regularly — especially in batches — a dedicated app saves real time. Download Compresto to compress JPEG, PNG, WebP, video, and PDF files on your Mac with one click. Hardware-accelerated, native, and built for batch workflows.