How to compress an image without losing quality
'Without losing quality' usually means without losing quality you can actually see, not zero technical change. Here's the honest version of how image compression works, and how to get a small file that still looks right.
What 'without losing quality' actually means
There are two different promises hiding inside that phrase, and mixing them up is where most confusion about compression starts. True lossless compression keeps every original pixel exactly, PNG works this way, and the only thing you're doing is packing the same information more efficiently, the way a ZIP file shrinks a document without changing a single word inside it.
Visually lossless is a different, more useful promise for photographs: real data is discarded, but in a way tuned to how human vision actually works, so the difference is not something you can see at normal viewing size, even though a pixel-by-pixel comparison would show one. Almost every time someone asks how to compress a photo 'without losing quality', this is the result they actually want, not literal pixel-for-pixel preservation.
Knowing which one you need decides everything downstream: which format to pick, which setting to touch, and how far you can reasonably push it before it starts looking like a mistake rather than a saving.
File size and quality are not the same axis
It's easy to assume a bigger file must mean a better image, but a lot of file size is spent on things that have nothing to do with how the photo looks. Embedded metadata, camera model, GPS coordinates, a thumbnail preview, colour profile data, can easily add tens of kilobytes to a photo that shows nothing visible for the cost.
Resolution is the other hidden factor. A photo saved at 4000 pixels wide carries four times the pixel data of the same shot at 2000 pixels wide, for a use, a blog post, a product thumbnail, a social post, where nothing on the page will ever display it larger than 1200 pixels anyway. That extra resolution is pure file size with no visible benefit at the size it's actually shown.
So before touching a quality slider at all, it's worth checking whether the file is large because it genuinely needs to be, or because of overhead that was never doing anything for the picture in the first place.
The four real levers
Once you set aside the overhead, there are exactly four things that actually change a photo's file size: the quality or bitrate setting, the pixel dimensions, the format you save it in, and whatever metadata is riding along inside the file. Everything you've ever read about compressing images is really a discussion of some combination of these four.
They interact rather than stack cleanly. Dropping resolution and dropping quality both shrink a file, but they cost you in different, non-interchangeable ways, a low-quality image at full resolution looks blocky and smeared in fine detail, a full-quality image shrunk too small just looks small. Picking the right lever for a given photo, rather than reaching for whichever one is most familiar, is most of what separates a good compression result from a mediocre one.
Quality settings, and where they actually break down
A JPG quality slider, usually shown as a percentage or a 1-to-100 number, controls how much detail the encoder is allowed to throw away, and it does so unevenly on purpose: it keeps the low-frequency information your eye is sensitive to, overall brightness and colour, and sacrifices high-frequency detail first, fine texture, sharp edges, because that's where vision is least likely to notice.
Above roughly 90%, further increases buy you almost nothing visible on an ordinary photo, you're paying real file size for a difference that shows up in a pixel-peeped crop and nowhere else. This site's converters default to 92% for exactly that reason, it sits just past the point of diminishing returns rather than chasing a number for its own sake.
Below about 75 to 80%, the specific ways compression fails start becoming visible rather than theoretical: blocky squares appear around sharp edges, an artefact called blocking, faint halos show up near high-contrast boundaries, called ringing, and smooth gradients, skies especially, can develop visible bands instead of a clean fade. Where exactly that threshold sits depends on the photo, a plain, low-detail image tolerates a much lower setting than a busy, textured one before it looks obviously compressed.
Resolution versus quality: the trade-off people usually get backwards
An oversized image at a low quality setting almost always looks worse than a correctly-sized image at a high one, for the same file size, because the artefacts from aggressive compression become more visible, not less, when the image is displayed larger than it needs to be.
The practical fix is to match the pixel dimensions to how large the image will actually be shown before worrying about the quality setting at all. A photo destined for a 600-pixel-wide spot in an article doesn't need to survive at 4000 pixels, scaling it down first, then compressing at a comfortably high quality, produces a smaller file that looks better than the reverse.
This is also why 'compress to a target file size' tools that only touch the quality slider eventually hit a wall: past a certain point, quality alone can't get a large, detailed image small enough without becoming visibly ugly, and reducing the dimensions is the only lever left that still produces an acceptable result.
Choosing the right format for the job
Photographs, anything with continuous tone, gradients, natural texture, belong in a lossy format: JPG for universal compatibility, WebP or AVIF if the destination supports them and you want a further size saving at the same visual quality.
Screenshots, logos, line art and anything with large flat areas of a single colour or sharp hard edges belong in PNG, or lossless WebP. Run one of these through JPG's lossy compression and you'll often see the opposite of the intended effect: a bigger file than the lossless version, because JPG's compression is tuned for photographic detail and does a poor job with sharp edges and flat colour, and worse, visible artefacts around exactly the edges that matter most in that kind of image.
PNG's own compression works differently again, and it's worth not confusing it with a quality slider: PNG is always lossless, so the only real lever inside the format itself is reducing the colour palette, which matters for a simple icon and does nothing useful for a photograph that already uses millions of distinct colours.
Hitting an exact target size
Sometimes the requirement isn't 'as small as reasonably possible', it's a specific number, an upload form capped at 200 KB, an email attachment limit, a submission portal with a hard ceiling. The compress-to-target-size tool on this site is built for exactly that case: tell it the size you need, and it works backward to find it rather than making you guess at a quality percentage.
Under the hood it tries the quality lever first, searching downward from a high starting quality until it finds the highest setting that still fits under your target, since that's the lever with the least visible cost. If quality alone can't get there, because the image is large or the target is genuinely tight, it falls back to reducing the pixel dimensions as well, rather than continuing to crush the quality setting into territory where it would look obviously bad.
If a file is already under your target size before you've touched anything, the tool says so plainly instead of pretending to have done work, and if nothing in a sensible range gets you there, it tells you that honestly too rather than silently handing back something wrecked.
Common mistakes that waste file size for nothing
Saving a screenshot or a simple graphic as JPG instead of PNG, which, as above, frequently produces a larger file with visible artefacts, the opposite of the intended result.
Re-saving the same JPG repeatedly across multiple rounds of editing. Each lossy save discards a little more detail on top of the last one's losses, a real, cumulative effect usually called generational loss. Always compress from the original file, never from an already-compressed copy, if you have the choice.
Leaving a full set of metadata, GPS coordinates, camera serial number, a full-resolution embedded thumbnail, inside a file meant only for the web, where none of it is ever read or displayed. It costs real file size for information nobody downstream needs, and if the photo has a location tag, it's also a quiet privacy leak into the bargain.
How much you can realistically expect to save
For an ordinary phone photo, moving to a sensible quality setting and a resolution that actually matches where it's being displayed commonly shrinks a file by somewhere in the 60 to 90% range, with the exact figure depending heavily on how oversized and how high-quality the original was to begin with.
Treat any specific percentage you read, including that range, as a rough expectation rather than a guarantee for your file. The honest version of this answer is always 'it depends on the photo', and the only way to know for a specific image is to actually try it and look at the result rather than trust a number in an article.
Doing this without uploading your photos anywhere
Most online compression tools work by uploading your file to a server, compressing it there, and sending back a link or a download. That's a reasonable way to build one, but it also means a copy of every photo you compress leaves your device and sits, even briefly, on hardware you don't control.
The tools on this site don't have that step. Compression happens inside the browser tab itself, using the same kind of code a native app would use, just running on your machine instead of someone else's. You can verify that directly: load the page, turn off your Wi-Fi, and compress a photo anyway, it still works, because nothing was ever waiting to be sent anywhere.
That matters most exactly when it's least convenient to think about it: the photo you're in a hurry to shrink for a form is often one with a face, a document, an address in the background, in it. A converter with no upload step removes that question entirely rather than asking you to trust a privacy policy you don't have time to read.
Quality settings for WebP and AVIF, not just JPG
Everything above about JPG's quality slider applies conceptually to WebP and AVIF too, higher settings preserve more, lower settings save more space, and there's a point past which further increases are wasted. The specific number where diminishing returns kick in differs by format and by encoder, because each compresses differently, so a '90%' in one format's slider is not directly comparable to a '90%' in another's.
In practice this means the safest approach when switching formats is not to assume the same numeric setting carries over. Compare the actual output, file size and visible quality together, rather than typing in the same percentage you'd use for JPG and trusting it.
Why two photos of the same size can compress very differently
A quality setting doesn't target a file size directly, it targets how much detail to discard, and how much file size that produces depends heavily on what's actually in the image. A busy, high-detail photo, dense foliage, a crowd, fine fabric texture, resists compression and stays relatively large even at a middling quality setting, because there is genuinely a lot of real detail for the encoder to describe.
A simple photo with large smooth areas, a plain background, a clear sky, an evenly lit product shot, compresses much further at the same setting, because there's comparatively little detail to preserve in the first place. This is why 'what quality setting should I use' never has one universal answer, the honest answer always depends on the specific photo, not a rule that applies equally to all of them.
It also explains why the target-size tool's approach, searching for the setting that fits rather than assuming one number works for everything, tends to produce a better result than picking a fixed percentage and hoping. Different photos genuinely need different settings to hit the same target.
Batch compressing a whole folder consistently
Compressing one photo by eye is manageable. Doing the same for a few hundred, evenly and without a hundred manual guesses, is the actual use case most people run into, moving a phone's camera roll somewhere with a size limit, preparing product photos for a listing, clearing out a folder before archiving it.
Batch conversion on this site applies the same setting, or the same target size, across every file in the run, processing them one after another rather than all at once, which keeps memory use manageable on an ordinary laptop or phone even for a large batch. Up to 200 files convert in one run, downloaded together as a single ZIP, with original filenames preserved so a large batch stays in an order you recognise.
If a batch is mixed, some photos already small, some huge, letting the target-size tool handle each file individually rather than applying one flat quality percentage across all of them tends to produce a more even, more predictable result, since it is solving for the outcome you actually want, a size ceiling, rather than for a setting that happens to work for some files and not others.
When 'good enough' compression is actually the wrong goal
Not every image should be compressed as hard as possible. A photo you might print, or one you're archiving as your only copy of something irreplaceable, a family photo, a document, a piece of ID, is worth keeping at high quality or entirely lossless, even at a larger file size, because you cannot get the discarded detail back later if you change your mind.
The right question isn't 'how small can this get' in isolation, it's 'how small can this get for what I'm actually going to do with it'. A photo for a text message tolerates far more compression than the same photo you might enlarge and print later. Deciding that before compressing, rather than after, is what keeps a size saving from turning into a regret.
Putting it together: a sensible default workflow
If none of the above feels like it resolves into a clear decision, here is an ordering that covers most real situations. Start by matching the pixel dimensions to where the image will actually be shown, there is rarely a reason to keep a 4000-pixel photo for a use that will only ever display it at 1200.
Pick the format based on content, JPG or WebP for photographs, PNG for anything with flat colour, hard edges or required transparency. Set quality around 90 to 92% as a starting point for photographs and adjust down only if the specific file needs to be smaller and still looks fine at a lower setting once you actually check it.
If there's a hard size limit rather than a general 'as small as reasonable' goal, use the target-size tool instead of hand-tuning a percentage, and let it decide whether quality alone gets there or whether dimensions need to come down too. Strip metadata as a matter of course for anything headed to the web, it costs nothing useful to keep and occasionally costs your privacy to leave in.
None of this needs to happen on a server somewhere. Every step here runs in the browser tab you already have open, which is worth remembering the next time a 'compress your image' tool asks you to upload a file before it will tell you anything at all.
One more thing worth remembering
None of the settings discussed above are permanent decisions burned into the original file. Because this site never modifies the file you start with, only ever producing a new one, there is no risk in trying a setting, checking the result, and trying again with a different one until it actually looks right for what you need it for.
That's worth keeping in mind specifically because 'without losing quality' was never really about finding one perfect number, it's about having room to experiment safely, which is exactly what a converter with no upload step and no destructive edit to the source file actually gives you.
Quick questions
What's the best quality setting for JPG?
Around 90-92% for most photos. Higher rarely looks different, below about 75-80% is where artefacts start becoming visible, depending on the image.
Does resizing an image count as compression?
Yes, and it's often the more effective lever. A smaller image at a higher quality setting frequently looks better than a full-size image squeezed to the same file size with quality alone.
Why is my PNG bigger than a JPG of the same photo?
PNG is always lossless, so it can't discard detail the way JPG does. It's the right format for screenshots and graphics, not usually for photographs.
Can I hit an exact file size instead of guessing a quality percentage?
Yes, the target-size tool on this site searches for the right quality automatically, and reduces dimensions too if quality alone can't reach your target.
Does compressing an image more than once make it worse?
Yes if each save is lossy. Always compress from the original file rather than an already-compressed copy when you can.
Should I strip metadata before compressing?
It's worth doing for anything going on the web. It saves some file size and, if the photo carries GPS data, removes a quiet privacy leak too.
Is compressing an image the same as converting its format?
Not the same thing, but changing format is one of the four real levers on file size, and sometimes the most effective one, PNG to JPG for a photo, for instance.
Are my photos uploaded when I compress them here?
No. It happens in your browser. Disconnect from the internet after the page loads and it still works.
Converters
The converter on this page handles every conversion this guide talks about.