What is a JPG file?
A JPG is a photograph saved in a way that keeps the file small, by letting go of small details your eye is unlikely to miss. It has been the standard way to store photos for decades, which is why practically everything can open one.
JPG AT A GLANCE
- File extensions
- .jpg, .jpeg, .jfif
- Best for
- Photographs
- Transparency
- No
- Quality loss
- A little, each save
- File size
- Small
- Opens in
- Everything
Why one format has three names
JPG, JPEG and JFIF are all the same kind of file. Any program that opens one opens the others, and you can rename between them freely without breaking anything.
The reason is old and slightly silly. Early versions of Windows only allowed three letters after the dot in a filename, so JPEG had to become JPG on those machines while Mac and Unix users kept the longer spelling. Both habits stuck, and now you see both everywhere.
The third one catches people out. If you save a picture out of a web browser on Windows you sometimes get a file ending in .jfif, and then an upload form or a design program refuses to accept it. Nothing is wrong with the file. Renaming it so it ends in .jpg is usually enough, and if whatever you are using still objects, running it through the JPG converter gives you a fresh file it will accept.
What JPG is good at, and what it is not
JPG is built for photographs. It handles soft, gradual detail beautifully and struggles with sharp edges, flat colour and text.
That is why a holiday photo looks perfect as a JPG at a fraction of the size it would otherwise take, and why a screenshot of a web page can come out looking slightly smeared around the writing. Same format, very different results, purely because of what is in the picture.
So the rule of thumb is simple. Anything from a camera: JPG is a fine choice. Anything made on a computer, with flat colour, sharp lines or text in it: use PNG instead and it will look right.
Keep the original if you are still working on it
Every time a JPG is edited and saved again it loses a little more detail, and those losses build up. Save your working copy as something else and export a JPG at the end.
You will not notice this once. You may well notice it after five or six rounds of opening, adjusting and re-saving the same file, especially if the picture has any text or hard edges in it. It creeps up rather than arriving all at once.
The habit worth having: keep whatever your camera or design software produced, work on that, and make a JPG when you are finished. If you need something to edit from and only have the JPG, converting it to PNG at least stops any further loss from that point on.
There is no see-through background
A JPG cannot store a transparent background. Every part of the picture has to be some colour, so anything see-through becomes solid when you save one.
This is the most common surprise people run into. Take a logo with a clear background, save it as a JPG, and it comes back sitting on a white or sometimes black rectangle. Nothing has gone wrong: the format simply has nowhere to record "leave this bit empty".
If the transparent background matters, you want a PNG or a WebP. If you genuinely need a JPG, it is worth choosing the background colour deliberately so it matches wherever the picture is going.
Questions people ask
No. They are the same kind of file with two spellings of the same name, and anything that opens one opens the other. You can rename one to the other and nothing breaks.
It is still an ordinary JPG, just saved under a third name that some programs use. It usually happens when you save a picture out of a web browser on Windows. If something refuses to accept it, renaming the file so it ends in .jpg is normally all it takes.
Yes, a little, if you are genuinely re-saving rather than just copying it. Editing and re-saving the same JPG over and over slowly softens it, and it shows up first around text and sharp edges. Keep the original if you plan to keep working on a picture.
No. Every part of a JPG has to be some colour, so anything see-through in the original becomes solid, usually white. If you need a transparent background, you need a PNG or a WebP instead.
JPG is built for photographs, not for text and sharp lines. Screenshots are full of exactly those, so they can come out looking slightly smeared. Save screenshots as PNG and the problem disappears.
No, though its job has narrowed. Newer formats produce lighter files for websites. What JPG still has, and nothing else does yet, is that essentially every device, program, printer and upload form made in the last thirty years accepts one.