Nobody wants to compress an image
They want it under the 10MB the form will take. They want the email to send. They want the insurance portal to stop rejecting the photo of the damage.
That is a size, not a quality. Yet nearly every compressor hands over a slider marked 1 to 100 and leaves you to drag it, export, check the file, find it is still too big, and go round again. The number you care about is the one thing you cannot type in.
So here you type the size. It compresses, measures what came out, adjusts and repeats, closing in on the highest quality that still fits underneath your number. That matters, because anything can get a photo under 2MB by making it look terrible. The useful answer is the best looking picture that still meets the limit.
Why your PNG is enormous
This catches people constantly, so understand it once.
PNG has two modes and most people only know about one of them.
Lossless stores every pixel exactly, which is perfect for a logo, a screenshot, a diagram or anything with sharp edges and flat colour.
Palette mode stores a list of colours and an index per pixel instead. That is what pngquant and TinyPNG do, and it can take a photographic PNG down by seventy per cent. What almost nobody tells you is that it can also go the other way: quantise a smooth gradient and the file gets several times larger, because the dithering noise ruins the row-to-row prediction that was compressing it so well in the first place.
So this encodes it lossless, at 256 colours, at 128 and at 64, measures how far each one moved the picture, and keeps the smallest that stays inside the error budget your quality setting allows. Sometimes the answer is that lossless already won, and it says so.
JPG is lossy. It throws away detail your eye is bad at noticing, and it is extremely good at it, which is why a photograph as a JPG is a fraction of the size with no visible difference.
Put a photograph in a PNG and you get every last pixel stored faithfully, all thirty megabytes of them, and no amount of compressing will change that. A screenshot of a spreadsheet stays crisp and small as a PNG. A photo of a building does not. That is why photos here come back as JPG or WebP.
Quality, or size on screen
There are two ways to make an image file smaller and they are not the same.
Quality keeps the picture the same size on screen and stores it less precisely. Push it too far and you see blocks around text, mottling in skies and a general smearing on faces.
Dimensions means fewer pixels. Halving the width of a photo quarters the pixel count, and on a phone photo it is very often the right answer, because a 4000 pixel wide image is far more than almost any use needs. Attached to an email, shown on a website, printed at 6 by 4, none of them are getting near 4000 pixels of value.
Which one to give up is the interesting question, and the answer is usually both. Taking a 4000 pixel photo down to a small file on quality alone leaves you with something large and visibly damaged. Reducing it to 2000 pixels first and keeping the quality high looks better at the same file size, because the bytes are spent on fewer pixels rather than badly on many.
So it measures how far over the target you are, works out the dimensions that would get close at a quality worth keeping, and then searches for the best quality that fits there. The row tells you both numbers afterwards. There is no hidden resizing, and it can be switched off if something downstream needs the original pixel size.
When it says it could not get there
Sometimes a picture will not go under a number without becoming useless, and this says so rather than handing back a file that misses the limit and hoping you do not check.
Usually that means the target is very small, the image is very large, or it is full of detail like foliage or crowds, which compresses badly because there is genuinely a lot of information in it. Allowing the dimensions to reduce nearly always solves it.
No limits, because there is nothing to limit
TinyPNG allows 20 files of 5MB before it asks for money, and holds your uploads for 48 hours. Other services watermark the output or cap the resolution unless you subscribe. All of them are rationing a server they have to pay for.
There is no server here. The work happens on the machine in front of you, so there is nothing to ration and no reason to charge you: no file count, no size cap, no queue, no account, no watermark and no retention policy, because nothing was ever retained.
Common questions
How do I get a photo under a specific size?
Type the size in and it works the rest out. It tries a quality, measures what came out, and narrows in on the highest quality that still fits under your number. That is the best looking picture that meets the limit, which is different from, and better than, dragging a slider until something works.
Is there a file limit or a queue?
No. Drop in as many as you like, any size. TinyPNG stops you at 20 files of 5MB and holds your uploads for 48 hours. This runs on your own machine, so the only limit is your machine, and nothing is held anywhere because nothing was sent anywhere.
Why did my PNG come out as a JPG?
You can now, and it is the right choice when the image has transparency, because JPEG has no alpha channel and would flatten it onto white. PNG is compressed by reducing it to a palette, the same technique pngquant and TinyPNG use. The catch is that it does not always help: on a smooth gradient a palette makes the file several times BIGGER, because the dithering destroys the row-to-row prediction PNG relies on. So several encodings are tried and the smallest one wins, and the tool tells you which it picked.
Why did it make my photo smaller in pixels?
Because that produces a better looking picture at the size you asked for. Forcing a 4000 pixel photo into a small file means the quality has to take the entire hit, and it comes out blocky and smeared. Reducing it to 2000 pixels and keeping the quality high looks far better for exactly the same number of bytes, and almost nothing needs 4000 pixels. Every row says what it did, and you can switch it off if something downstream needs the original dimensions.
Should I pick JPG or WebP?
JPG unless you know what is receiving it. WebP is genuinely better, usually 25 to 35 per cent smaller at the same quality, and every current browser reads it. Some older software and a fair few upload forms still reject it, and a rejected upload is worse than a slightly larger file.
Are my photos uploaded?
No. They are read, redrawn and re-encoded by your own browser, and no request leaves the page. That is worth caring about: the photos people compress are usually of their own home, their own children or their own documents.