What a JPG file is
What a .JPG file is, what it does well, what opens one, and how to convert it — with every conversion running in your own browser.
What a JPG file is
A JPG is a photograph compressed by throwing away detail the eye is bad at noticing. The encoder breaks the picture into blocks, describes each one in terms of how sharply it changes rather than pixel by pixel, and then keeps fewer of those descriptions than it was given. What is discarded is gone: no amount of converting afterwards will bring it back.
That sounds worse than it is. On a photograph, at a sensible quality setting, the result is visually indistinguishable from the original at a fraction of the size — which is why every camera in the world writes JPGs and why the format has survived every attempt to replace it.
It goes badly on the wrong material. Sharp edges are exactly what the compression handles worst, so text, screenshots, line art, and logos come out with visible smudging around the edges. JPG also has no transparency at all: a transparent area becomes a solid colour, usually white or black, with no warning.
Where it came from
The Joint Photographic Experts Group published the standard in 1992, and its timing decided the shape of the web. Photographs at dial-up speeds were impossible without it. The name people type — jpg rather than jpeg — is an artefact of MS-DOS allowing only three characters after the dot, a limitation gone for thirty years and preserved in a billion filenames.
JPG at a glance
| Property | JPG |
|---|---|
| Compression | Lossy |
| Colour | 8 bits per channel |
| Transparency | None |
| Animation | No |
| Keeps EXIF | Yes |
| Browser support | Every browser since 1995 |
| Size of a photograph | The baseline this row compares against |
| Published | 1992 |
JPG at a glance
- Compression is lossy. The detail the encoder discarded is not in the file, so no later conversion recovers it, and every re-encode costs a little more.
- Colour is stored as 8 bits per channel, which is enough for the gradients in a photograph to look smooth rather than stepped.
- There is no transparency. Converting an image that had some produces a solid background, and which colour it becomes is a choice the converter has to make for you.
- Camera settings, dates, and copyright fields travel with the image, which matters if you are converting photographs you intend to keep attribution for.
What it is good at
- Carries camera settings, dates, and copyright information alongside the image.
- Every browser in use reads it, and has for long enough that it needs no fallback.
Where it falls short
- No transparency of any kind. A transparent area becomes a solid colour, usually white or black.
- One frame only. An animation converted to it keeps the first frame and drops the rest.
- Detail is discarded permanently, and a little more goes with every re-save.
What to use instead of JPG
- For anything that needs a transparent background — a logo, an icon, a cut-out — use PNG, or WebP if the file is destined for a web page you control.
- For an image you will keep editing, use PNG. It discards nothing, so it survives being opened and saved as many times as the work takes.
- For anything that moves, use animated WebP. GIF also animates and is more widely accepted, but stores the same clip at several times the size with a fraction of the colours.
When to use JPG
Choose JPG for photographs, and for anything that behaves like one: a scan of a painting, a rendered scene, a picture of a person. Choose it when the file has to open absolutely everywhere, because there is no camera, phone, printer, or piece of software that will refuse one.
Avoid JPG for screenshots, logos, line art, and anything with text, where its compression leaves visible smudging along every edge. Avoid it as a working format too: each save loses a little more, so an image edited in stages should be kept as PNG until it is finished.
What opens a JPG file
On a computer, JPG files open in Preview on macOS, Photos on Windows, GIMP, Photoshop.
Every browser in use displays them, so opening one is usually a matter of dragging it into a browser window.
Turn a JPG file into something else:
Produce a JPG file from something else:
Common problems with JPG
- The transparent background turned white.
- The format has no transparency at all, so the converter had to fill those pixels with something. Convert to PNG, WebP, or AVIF instead if the transparency matters, or set the background colour deliberately so it matches wherever the image will sit.
- The image looks worse every time I save it.
- The compression is lossy, so each save runs the encoder again over an image it has already been through and discards a little more. Keep the original and edit from it rather than from an export of an export. If you must work in stages, hold the intermediate copies in a lossless format.
Converting a JPG file here
- Choose your file, or drag it onto the box. It is read from your device and goes no further.
- Set whatever the conversion offers — quality, size, background — and start it. Everything runs on your own machine, so a large image uses your memory and your processor rather than a queue somewhere.
- Download the result. Nothing is kept: leaving the page or resetting it releases the file and the converted copy alike.
JPG against the alternatives
Common questions
- Does converting a JPG to PNG restore its quality?
- No. PNG stores exactly what it is given, and what it is given is a JPG that has already lost detail. The result is a much larger file holding the same damaged image. Converting to PNG is worth doing only when you need transparency or want to stop losing more with each save.
- Why does my JPG look worse every time I save it?
- Because each save runs the encoder again over an image the encoder has already been through, and each pass discards a little more. This is called generation loss. Edit from the original whenever you can, and if you must work in stages, keep the intermediate copies as PNG.
- What quality setting should I use?
- Around three quarters is indistinguishable from the original for most photographs on most screens, and roughly halves the file against the maximum. Go higher only for images that will be edited further, and lower only when a size limit forces it.
- What happens to the camera data and copyright fields?
- They survive where the target format has somewhere to keep them and are dropped where it does not. If attribution matters, check the result rather than assume — metadata is the first thing most conversions lose, and it goes silently.
- How much smaller or larger will the file get?
- The table above states the size of the same photograph in each format against JPG, which is the closest thing to an answer that holds in general. The real figure depends on the picture: flat colour and sharp edges behave very differently from a photograph, and the ranges assume a photograph.
- How do I open a .JPG file?
- The software listed above reads them directly. If nothing on your machine will, converting to PNG or JPG is the reliable route — both open in everything, and the conversion happens here in your browser rather than on a server.
- Does converting a JPG file lose quality?
- It depends on what you convert it to rather than on what you convert from. Converting to a lossless format such as PNG preserves every pixel; converting to JPG, WebP, or AVIF discards detail permanently. Nothing recovers quality the file had already lost.
- Is converting from JPG free, and does it upload my file?
- Free, with no account, and nothing is uploaded. Every converter on this site reads your file with the browser's own file APIs, converts it using code running on your device, and hands the result back as a download. You can confirm that yourself in the Network panel of your browser's developer tools.
- Where does the conversion happen?
- In your browser, on your own device. There is no conversion server here to upload anything to, and no third-party service is involved. That is a statement about what the site does rather than a promise about how it handles uploads, because no upload takes place.