Notepad - How to compress images without losing quality
How to compress images without losing quality
A practical guide to image compression — lossy vs lossless explained, format-specific quality settings, and how to reduce image file size without visible degradation.
March 29, 2026 · 10 min read
Most people arrive at an image compressor with one specific problem: a file is too large for an upload field, an email attachment, or a web page. The goal is a smaller file that still looks right. This guide explains how to get there — including what “without losing quality” actually means, which settings to use for different formats, and when to resize instead of compress.
What “without losing quality” actually means
The phrase is used so often that it has lost meaning. In practice, there are two different promises it can make.
Lossless compression means every original pixel is preserved. The file shrinks because redundant data is encoded more efficiently, not because any information is discarded. The image decoded from a losslessly compressed file is bit-for-bit identical to the original. PNG and WebP both support lossless compression.
Perceptually lossless compression means data is removed, but the removed data is not visible to the human eye at normal viewing sizes. JPEG compression works this way. At a quality setting of 80–85, JPEG typically removes information that corresponds to subtle color transitions and fine texture that most viewers never notice. The output is not mathematically identical to the original, but it is visually indistinguishable in most real-world contexts.
When someone says “compress without losing quality,” they almost always mean the second option. Genuinely lossless compression of a typical photo produces much smaller savings — usually 10–20% — compared to the 50–70% reduction available from well-tuned lossy compression.
Knowing which type you are using matters because it changes the right tool and the right settings.
Lossy vs lossless image compression
| Type | How it works | Best for | Typical file size reduction |
|---|---|---|---|
| Lossy | Removes visually non-critical data | Photos, web images, email attachments | 50–80% |
| Lossless | Re-encodes data without discarding it | Logos, diagrams, screenshots, anything you plan to edit later | 10–30% |
The rule of thumb: use lossy for photos you are publishing or sending. Use lossless for anything with sharp edges, flat colors, or text, and for any image you will open and edit again later. Re-compressing a JPEG that has already been lossy-compressed causes quality to degrade further with each pass, so keep lossless originals of anything important.
Format-specific compression: JPEG, PNG, and WebP
Format choice affects how much you can compress before visible degradation appears. The right format for the image type matters as much as the compression level.
Compress JPG without losing quality
JPEG is a lossy format. Quality is set on a scale of 0–100, but the relationship between quality setting and file size is non-linear. Dropping from 100 to 85 can cut file size by 50–70% with virtually no visible difference. Dropping from 85 to 70 produces a further reduction with still-acceptable results for most photos. Below 60, blocking artifacts and color banding start to become obvious.
Practical quality targets for JPEG:
| Use case | Quality setting |
|---|---|
| Hero images, portfolio | 80–85 |
| Blog post photos | 75–80 |
| Email attachments | 65–75 |
| Product thumbnails | 60–70 |
| Print output | 90–95 |
One important point: never re-save a JPEG at a high quality setting to “recover” lost quality. The original data is gone. Re-saving only adds another round of loss.
Compress PNG without losing quality
PNG uses lossless compression. A PNG file is always losslessly compressed — there is no quality slider. The main levers are the compression level (which affects encoding time, not image quality) and removing unnecessary metadata.
For photos saved as PNG, the file will always be larger than an equivalent JPEG because PNG has to encode all that photographic detail losslessly. The exception is screenshots, UI captures, and flat-color graphics, where PNG produces sharper results than JPEG and often smaller files too.
If you have a photo as a PNG and want a smaller file, the right move is usually to convert it to JPEG or WebP rather than trying to squeeze the PNG further.
WebP: smaller files, same visual quality
WebP supports both lossy and lossless compression and is designed for web delivery. A WebP image at equivalent visual quality is typically 25–35% smaller than a JPEG. For lossless content like screenshots, WebP is also 20–30% smaller than PNG.
Browser support for WebP is now effectively universal. For any image going to a website, WebP is worth considering as the default format. The trade-off is compatibility outside browsers — some older email clients, design tools, and CMS platforms handle WebP inconsistently.
Best image compression settings for quality
There is a compression sweet spot for each type of image content. These are starting points, not absolute rules — always check the preview before downloading.
Photos with lots of detail (portraits, landscapes, product shots): quality 75–85 in JPEG or WebP lossy. This cuts file size by more than half with no obvious degradation at typical web display sizes.
Screenshots and UI captures: PNG or lossless WebP. JPEG compression on these images causes visible blocking around text and sharp edges, sometimes making the file larger than a PNG.
Flat-color graphics and logos: PNG or SVG. Lossy compression on flat-color images tends to create muddy halos around edges.
Images for web pages: target under 200 KB per image. For large hero images, under 400 KB is a reasonable ceiling. Most viewers will not notice quality differences at these file sizes compared to uncompressed originals.
Images for print: keep at 90+ quality. Print output requires higher fidelity than screen, and file size matters less since the file is not being delivered over a network.
How to compress images in the browser
The image compressor runs entirely in the browser. Nothing is uploaded to a server — the file never leaves your device.
- Open the image compressor.
- Drop in the file (JPEG, PNG, or WebP).
- Start with the default compression setting.
- Preview the result alongside the original and check the new file size.
- Adjust the quality slider if the default produces too large a file or visible artifacts.
- Download when the result looks acceptable.
The preview step is where most quality problems are caught before they reach a live page or an inbox.
When to reduce image file size by resizing instead
Compression and resizing are different tools. Resizing reduces the number of pixels in the image. Compression changes how efficiently those pixels are stored. Both reduce file size, but through different mechanisms.
If a 4000-pixel-wide photo will display at 800 pixels on screen, resizing it first and then compressing produces a dramatically smaller file than compression alone — with no perceptible quality loss, because you are not encoding pixels that were never going to be visible.
The correct order: resize to the largest dimension the destination requires, then compress. Doing both steps together gives you the smallest file with the highest apparent quality.
A quick reference for common web dimensions:
| Use case | Recommended width |
|---|---|
| Full-width hero image | 1600 px |
| Blog post inline image | 800–1200 px |
| Product image | 800–1000 px |
| Thumbnail | 300–600 px |
Compressing images for web
Web images have two jobs: look good and load fast. The target is the smallest file that looks acceptable at the display size.
Practical web compression checklist:
- Resize before compressing. Serving a 4000 px image in a 900 px container wastes bandwidth and slows load times.
- Use JPEG or WebP for photos. PNG photos are always larger.
- Strip metadata. Camera EXIF data (GPS coordinates, shutter speed, color profiles) can add 20–100 KB to an image with no visual benefit on screen.
- Aim for under 200 KB per image. For most web contexts this is achievable without visible quality loss.
- Check Google’s Core Web Vitals. Oversized images are one of the most common causes of poor Largest Contentful Paint (LCP) scores, which affects search ranking.
Images make up around 20% of an average webpage’s total transfer weight. Compressing images well is one of the highest-return optimizations available for page speed.
Batch image compression
If you have multiple images to compress, handling them one at a time is slow. Common options:
Online tools: The image compressor handles individual files fast. For bulk workflows, tools like TinyPNG and Squoosh offer batch modes in the browser.
Desktop tools: On Mac, Preview can export a batch of images at a specified quality level. On Windows, GIMP supports batch export scripts. Both are free.
Command line: ImageMagick’s convert command and the cwebp encoder allow scriptable batch compression. Useful if you have dozens or hundreds of images and consistent settings.
WordPress and CMS plugins: ShortPixel, Imagify, and Smush compress images on upload, applying consistent settings automatically without manual steps.
For most people doing occasional compression, the browser-based tool is the fastest option. For recurring workflows on a website, an automated plugin approach removes the manual step entirely.
What to avoid when compressing images
- Re-compressing the same JPEG multiple times. Each pass removes more data from an already lossy file. Keep the original and compress it fresh each time.
- Cranking quality to minimum without checking the output. Always preview before downloading.
- Ignoring format choice. A photo saved as PNG will be much larger than it needs to be. A screenshot saved as JPEG will have visible artifacts. Format selection comes before compression level.
- Compressing images that will be edited later. Keep lossless originals in your working files. Only compress when the image is final and headed to a specific destination.
- Over-compressing for print. The file size savings from heavy compression don’t matter for print; the quality loss does.
Frequently asked questions
Can you really compress images without any quality loss? Lossless compression is genuinely quality-free — the decoded image is bit-for-bit identical to the original. But lossless compression on photos typically only reduces file size by 10–30%. The much larger reductions most people want (50–80%) require lossy compression, which removes data. At quality settings of 75–85, that data removal is perceptually invisible for most photos at typical screen sizes.
How much can I compress a JPEG before it looks bad? It depends on the image content. Photos with smooth gradients and limited detail tolerate higher compression than images with fine texture or text. As a starting point, quality 80 is a safe default that produces significant file size reduction with minimal visible artifact. Below quality 60, blocking and color banding usually become visible.
Should I use WebP instead of JPEG? For images going to websites, WebP is worth using: same visible quality, 25–35% smaller file. For images being shared across tools, email clients, and devices, JPEG has broader compatibility. If you are not sure what the destination supports, JPEG is still the safer choice.
Does removing EXIF metadata affect the image? No. EXIF data (camera model, GPS coordinates, timestamp, color profile) is metadata attached to the file, not part of the pixel data. Removing it has no effect on visual quality and can reduce file size by 20–100 KB.
Why does my PNG file not get much smaller when I compress it? PNG is already a lossless format — it encodes all pixel data with no quality reduction. Tools that apply “compression” to a PNG are usually adjusting the internal encoding level, which has a ceiling effect. If the PNG is a photo, the real solution is converting it to JPEG or WebP, which can produce a 60–80% size reduction. If the PNG is a screenshot or flat graphic, it may already be close to its minimum lossless size.
Is it safe to compress images in the browser? When the tool runs locally — meaning the compression is done by code running in your browser rather than on a remote server — the image never leaves your device. The image compressor works this way: no upload, no server, no third-party storage. This matters when compressing client photos, medical images, or any private visual content.
Try the tool
Compress Image
Compress images in your browser with local processing and adjustable quality, without uploads or watermarks.
ConvertRelated posts
How to compress a video for Discord (free, no install)
Discord's 25 MB free limit blocks a lot of clips. This guide covers the fastest ways to compress video for Discord — in the browser, on desktop, and on mobile — without destroying quality.
March 31, 2026 · 8 min read
How to Convert MKV to MP4 (Without Losing Quality)
MKV files won't play on iPhones, most smart TVs, or social platforms. Here are the fastest ways to convert MKV to MP4 on any device—browser, desktop, or command line.
March 31, 2026 · 9 min read
How to convert PNG to JPG
Convert PNG to JPG on any device — browser, Mac, Windows, iPhone, Android, or command line. Smaller files, same visual quality.
March 31, 2026 · 9 min read