JPEG is a way to shrink photo files so they take up less space on your device
JPEG (Joint Photographic Experts Group) is a file format that compresses photographs into smaller files. When you take a photo on your phone, email a picture, or read an image from a website, it is usually a JPEG file. The format trades some image detail for a much smaller file size — a photo that would be 50 megabytes uncompressed might be 2 megabytes as a JPEG.
JPEG works by removing information your eye is less likely to notice. It keeps the colors and main shapes sharp while discarding fine details in areas where the human eye cannot easily see them. This is why JPEG is ideal for photographs and realistic images, but not for text, diagrams, or graphics with solid colors — those formats need different file types.
You control how much compression happens when you save a JPEG. Higher quality means larger files and more detail preserved. Lower quality means smaller files but visible blurriness or blockiness, especially in areas with gradual color changes like skies or skin tones.
Key Takeaways
- JPEG files are smaller than uncompressed photos because the format removes detail your eye typically cannot see.
- You can adjust the quality level when saving a JPEG — higher quality keeps more detail but creates larger files.
- JPEG works well for photographs and realistic images but produces poor results for text, logos, or graphics with solid colors.
- Every time you open and re-save a JPEG, it loses a small amount of quality because compression happens again.
- Most cameras, phones, and websites use JPEG as the default photo format because the file size is manageable and quality is acceptable for most uses.
How JPEG compression actually works
JPEG compression happens in stages. First, the format converts the image from RGB color (red, green, blue channels) into a different color space called YCbCr. This separates brightness from color information, which matters because human eyes notice brightness changes more than color changes.
Next, the format divides the image into small 8-by-8 pixel blocks and analyzes each block separately. Within each block, it keeps the overall color and brightness but discards fine variations — the tiny differences that your eye blends together anyway. The more you compress, the more information gets thrown away, and the blockier the image becomes.
Finally, JPEG uses mathematical encoding to store what remains. The result is a file that contains enough information to reconstruct a recognizable photo, but not every original pixel. This is why JPEG is called a lossy format — information is permanently lost during compression.
When JPEG is the right choice and when it is not
JPEG works best for photographs, artwork with many colors, and realistic images where slight quality loss is invisible. A family photo, a landscape, or a portrait looks fine as a JPEG at normal quality settings. Websites use JPEG for most photos because the file size is small enough to load quickly.
JPEG performs poorly for text, logos, diagrams, and graphics with solid colors or sharp edges. Text becomes blurry. Logos with flat colors develop visible artifacts and color banding. If you need to preserve crisp lines and exact colors, use PNG format instead, which compresses without losing detail. If you need to edit an image many times, keep it in an uncompressed or lossless format like TIFF or PSD, then export to JPEG only when you are finished.
Screenshots and diagrams should almost never be JPEG. The compression creates visible noise around text and edges. PNG is the standard choice for anything with text or sharp boundaries.
Quality settings and file size trade-offs
When you save a JPEG in most photo software, you choose a quality level — usually a number from 1 to 100, or a slider from low to high. A quality setting of 90 or above preserves nearly all visible detail and produces files suitable for printing. A setting of 75 to 85 is standard for web use — the image looks good on screen but the file is noticeably smaller. Below 60, compression artifacts become obvious: you see blockiness, color banding, and blurriness in gradual areas.
The relationship between quality and file size is not linear. Raising quality from 50 to 60 might double the file size. Raising it from 85 to 95 might increase it by only 20 percent. For most purposes, a quality of 80 is a reasonable balance — the file is small enough to email or upload quickly, but the image still looks sharp on a screen.
Different software may label quality differently. Some use percentages, some use numbers 0 to 12, and some use descriptive terms like "high" or "medium". Check your software's documentation to understand what each setting produces.
JPEG versus PNG, WebP, and other formats
PNG is a lossless format that compresses without throwing away information. PNG files are larger than JPEG for photographs, but PNG is better for images with text, logos, or areas of solid color. PNG also supports transparency — you can have a transparent background. Use PNG when quality and sharpness matter more than file size.
WebP is a newer format developed by Google that compresses more efficiently than JPEG. A WebP file at the same quality level is typically 25 to 35 percent smaller than JPEG. WebP supports both lossy and lossless compression, and it also supports transparency like PNG. However, older devices and browsers may not recognize WebP files, so JPEG remains more universal.
GIF is an older format used mainly for straightforward graphics and animations. GIF files are usually larger than JPEG for photographs and support only 256 colors, so they are not suitable for modern photos. TIFF is an uncompressed or losslessly compressed format used in professional photography and printing — files are very large but quality is perfect.
Why JPEG files lose quality when you edit and re-save them
JPEG is a lossy format, which means compression discards information. Every time you open a JPEG, edit it, and save it again, the format compresses the image a second time. The second compression removes detail from what is already a compressed image, causing visible quality loss. After several edit-and-save cycles, a JPEG can look noticeably worse.
To avoid this, edit in an uncompressed or lossless format. Most photo software can open a JPEG and save it as PSD (Photoshop), TIFF, or another lossless format. Make all your edits in that format, then export to JPEG only once, at the end. This way you compress only once, and the final JPEG looks as good as possible.
If you receive a JPEG and need to edit it, save your work in a lossless format before closing the file. Do not repeatedly open and save the same JPEG.
How to choose the right quality when saving your own photos
For photos you plan to print, use a quality setting of 90 or higher. Printers show detail that screens do not, so compression artifacts become visible in prints. For photos you plan to display on a website or social media, a quality of 75 to 85 is standard — the image looks sharp on any device, and the file loads quickly.
For photos you are emailing or sharing in a messaging app, a quality of 70 to 80 is acceptable. The file is small enough to send without delay, and the image still looks good on a phone or computer screen. For thumbnails or very small images, you can go lower — quality 60 to 70 — because compression artifacts are less visible at small sizes.
Test your chosen quality setting by saving a sample image and viewing it on the device where it will be seen. If it looks sharp and colors look right, that quality level is fine. If you see blockiness or blurriness, raise the quality by 5 to 10 points and try again.
Frequently Asked Questions
Can I convert a JPEG to PNG or another format without losing quality?
Converting a JPEG to PNG does not restore lost detail — the information was already discarded during JPEG compression. The PNG file will be larger, but it will not look sharper than the original JPEG. If you need a higher-quality version, you need the original uncompressed file or a re-export from the source.
Why do my JPEG photos look blurry when I zoom in?
JPEG compression removes fine detail, so zooming in reveals blockiness and blurriness that are not visible at normal viewing size. This is normal and expected. If you need sharp detail at all zoom levels, use PNG or an uncompressed format, but the file will be much larger.
Is JPEG safe to use for important documents or archives?
JPEG is not recommended for long-term storage of important documents or photos you may want to edit later. Because compression is lossy, quality degrades over time if you re-save the file. For archival purposes, use TIFF or PNG. For documents with text, use PDF.
What quality setting should I use if I do not know what the image is for?
A quality of 80 is a safe middle ground for most purposes. The file is reasonably small, the image looks sharp on screens, and compression artifacts are not obvious. You can always re-export at a different quality if needed.
Why do some websites automatically convert my photos to JPEG?
Websites convert photos to JPEG to reduce file size and speed up page loading. JPEG is the most widely supported format and produces acceptable results for most photos. If you upload a PNG or WebP, the website may convert it to JPEG automatically to save storage space and bandwidth.