Image format
What is a .jpg file?
JPG (or JPEG) is the standard format for photos. It uses lossy compression, discarding detail the eye barely notices, so a photo takes a fraction of the space it would as PNG.
It has no transparency and loses a little quality every time it’s saved again. In exchange, it opens on every device and app made in the last 30 years.
fileclay opens and writes JPG
JPG vs PNG vs WebP
| JPG | PNG | WebP | |
|---|---|---|---|
| Compression | Lossy | Lossless | Lossy or lossless |
| Transparency | No | Yes | Yes |
| Animation | No | APNG | Yes |
| Color depth | 8 bits | Up to 16 bits | 8 bits |
| Support | Everywhere | Everywhere | All modern browsers |
| Best for | Photos | Graphics, screenshots | Images on the web |
Photo, 1600 × 1067
Screenshot, 1280 × 800
Encoded in Chromium, with JPG and WebP at quality 80. PNG keeps every pixel; the other two discard detail.
When to use JPG
Good for
- Photos you want to share or upload
- Images on sites that only accept JPG
- Printing photos at home or at a shop
Not a good fit
- Logos and text: edges pick up visible artifacts
- Anything that needs a transparent background
- Images you’ll edit and save many times
How to open .jpg files
| Platform | App | Notes |
|---|---|---|
| Windows | Photos | Built in |
| macOS | Preview, Photos | Built in |
| iPhone, iPad | Photos, Files | Built in |
| Android | Google Photos, Gallery | Built in |
| Browsers | Chrome, Safari, Firefox, Edge | Drag the file into a tab |
| Editors | Photoshop, GIMP, Affinity Photo, Paint | Opens and saves |
Convert JPG files
From JPG
To JPG
All 23 output formats: .png, .webp, .bmp, .tif, .tiff, .gif, .tga, .jp2, .j2k, .j2c, .ico, .ppm, .pgm, .pbm, .pam, .qoi, .pcx, .exr, .sgi, .xbm, .jpeg, .pdf, .pptx
Conversions run in your browser. Files aren’t uploaded.
How to identify a .jpg file
Every JPG starts with FF D8 FF. The next byte says what kind of segment comes first, so it varies between cameras and apps.
It’s read here, in your browser. Only the first bytes.
Your file
What comes after
Questions about JPG
What is the difference between JPG and JPEG?
None. They are the same format. The three-letter .jpg comes from old Windows versions that limited extensions to three characters.
Does JPG lose quality every time it’s saved?
Yes, when the image is encoded again. Opening, copying or renaming the file doesn’t change it.
Why is there no transparency in JPG?
The format has no alpha channel. A transparent PNG converted to JPG gets a solid background.
What quality should a JPG have?
Between 75 and 85 is hard to tell from the original for most photos. Above 95 the file grows a lot for very little.
Is JPG or PNG better for photos?
JPG. In our test the same photo took 180 KB as JPG at quality 80 and 2.6 MB as PNG.