Format reference · .jpg .jpeg .jfif
What is a JPG file?
JPG (also written JPEG) is a lossy image format designed for photographs. It throws away fine detail the eye rarely notices, which keeps photos small, and it opens on almost every phone, computer, browser and app in use today.
Where JPG came from
The format is named after the Joint Photographic Experts Group, the committee that published the standard in 1992. The three-letter .jpg extension exists because early Windows and DOS file names allowed only three characters after the dot. A .jpg, .jpeg or .jpe file is the same format; only the name differs.
Strictly speaking, JPEG describes the compression method. The files people share are wrapped in a small container, usually JFIF or the EXIF structure that cameras and phones write. That container is where camera settings, the date taken and sometimes GPS coordinates are stored.
How JPG compression works
A JPG encoder first converts RGB pixels into one brightness channel and two color channels. Because people are far more sensitive to brightness than to color, the color channels are usually stored at half resolution in each direction (called 4:2:0 chroma subsampling). The image is then cut into 8×8 pixel blocks, and each block is turned into frequency values with a discrete cosine transform.
The lossy step is quantization: high-frequency values, which carry fine texture, are divided by larger numbers and rounded, so many become zero. The quality setting controls how aggressive this rounding is. Finally the remaining values are packed with Huffman coding. Even quality 100 is not lossless, because rounding and color subsampling still happen.
When compression is pushed too far, you see the typical artifacts: visible 8×8 blocks in smooth skies, “ringing” halos around sharp edges and text, and smeared color along saturated red or blue edges.
No transparency, no animation
Every JPG pixel is fully opaque. There is no alpha channel, so a logo with a transparent background gets a solid background when saved as JPG. When you convert a transparent PNG with PNG to JPG, Pixellin fills those areas with white by default, and you can pick another color. JPG also holds a single still image only; it cannot animate.
Most JPGs use 8 bits per channel. The standard allows more, but that mode is rarely supported, so JPG is not a good fit for HDR or heavy color grading.
Generation loss: why re-saving hurts
Opening or copying a JPG doesn’t change it. Saving it again after an edit does, because the encoder runs quantization a second time on pixels that were already approximated. A few re-saves at high quality are hard to spot; dozens at low quality build visible mush. Keep an original, do all your edits, and export a JPG once at the end.
Support and typical file sizes in 2026
JPG is the most widely supported image format there is: every browser, operating system, email client, printer kiosk and upload form accepts it. That compatibility, more than its efficiency, is why it remains the default for camera photos.
A 12-megapixel phone photo saved at high quality is often 2–5 MB. Resized to around 1600 pixels wide and saved at quality 75–85, the same photo commonly drops to a few hundred KB with no obvious difference on screen. Compress JPG uses MozJPEG with progressive encoding to get there, and newer formats such as WebP and AVIF can go smaller again at similar quality.
Use JPG for
- Photos you need to email, message or upload anywhere
- Camera and phone pictures with gradients and natural texture
- Online forms that only accept JPG or set a KB limit
- Web photos where maximum compatibility matters more than size
Avoid JPG for
- Logos, screenshots and text, which pick up halos around edges
- Anything that needs a transparent background
- Master files you plan to edit and re-save many times
- Animations of any kind
JPG questions
Is JPG the same as JPEG?
Yes. JPG and JPEG are two names for the same format, and .jpg, .jpeg and .jpe extensions are interchangeable. The shorter spelling comes from older systems that limited file extensions to three characters. Renaming one to the other doesn’t change the file at all.
Does a JPG lose quality every time I open it?
No. Viewing, copying or renaming a JPG never changes its pixels. Quality is lost only when the image is decoded, edited and encoded again as a JPG. To limit the damage, edit from an original and export once at a sensible quality rather than saving over the same file repeatedly.
What JPG quality setting should I use?
For web pages and sharing, 75–85 usually looks identical to the original on screen while saving a lot of space. Use around 90 when you want a high-quality copy to keep. Below about 60, blocky areas and halos around edges tend to become noticeable, especially in skies and on text.
Why did my transparent image get a white background as a JPG?
JPG has no alpha channel, so every pixel must have a solid color. Transparent areas have to be filled with something when converting, and white is the usual default. If you need the background to stay see-through, save as PNG, WebP or AVIF instead.
Can a JPG be lossless?
Not in practice. The original standard included a lossless mode and a later variant called JPEG-LS exists, but almost no everyday software or browser reads them. A normal JPG is always lossy, even at quality 100. For pixel-exact copies, use PNG or lossless WebP.