JPG is a way to store photos that makes the file smaller without losing much quality

JPG (also written as JPEG) is a file format — a standard way of packaging picture data so that cameras, phones, computers, and websites can all read and display the same image. When you take a photo on your phone or read a picture from the internet, it is almost always a JPG file. The format compresses the image, which means it squeezes the data down to a smaller size so the file takes up less space on your device and uploads or downloads faster.

The trade-off is that JPG uses lossy compression, a technical term meaning some of the original picture information gets thrown away to make the file smaller. For photographs of real scenes — people, landscapes, sunsets — this loss is usually invisible to your eye. For images with sharp lines, solid colors, or text, the loss becomes noticeable as blurry edges or color banding. That is why screenshots and diagrams often look better in other formats.

JPG became the standard for photos because it balances file size against image quality better than most alternatives. A photo that might be 50 megabytes as an uncompressed file can be 2 or 3 megabytes as a JPG, which made it practical to email photos and load them on websites when internet speeds were slow. Even now that storage and bandwidth are cheaper, JPG remains the default because every device supports it.

Key Takeaways

  • JPG is a compressed file format designed for photographs, making image files much smaller so they are easier to store and share.
  • The format removes some picture data to achieve compression, which is invisible in photos but noticeable in images with text or sharp lines.
  • Every camera, phone, and web browser can open JPG files, which is why it became the standard for photos across all devices.
  • When you save a JPG file multiple times, the quality gets worse each time because compression happens again, so avoid re-saving JPGs repeatedly.
  • Other formats like PNG preserve all image data but create larger files, and HEIC is newer and smaller but not supported everywhere yet.

How JPG compression actually works

JPG compression works in two stages. First, the format converts the image from RGB color (the way screens display color using red, green, and blue light) into a different color space that separates brightness from color information. Human eyes notice changes in brightness much more than changes in color, so this step lets the format throw away color detail while keeping brightness sharp.

Second, the format divides the image into tiny 8-by-8 pixel squares and analyzes each square separately. It keeps the information that describes the overall tone and color of each square, but discards fine details. When you view the image, your eye blends these squares back together and the loss becomes invisible — unless the image has thin lines, text, or areas of solid color, where the square boundaries become visible as blocky artifacts.

Most JPG files let you choose a quality setting when you save them, usually on a scale from 1 to 100. A setting of 90 or higher looks nearly identical to the original photo but is still much smaller. A setting of 70 to 80 is the practical sweet spot for web use — small enough to load quickly but still clear enough for most purposes. Below 60, the compression becomes visible as blurriness and color banding.

Why JPG is everywhere and what the alternatives are

JPG dominates because it solves a real problem: it makes photos small enough to email, text, and upload to social media without requiring special software. Your phone camera saves to JPG by default. Websites display photos as JPG. Email services compress attachments to JPG. The format is so universal that you can open a JPG file on a computer from 1995 or a phone from next year.

PNG is an alternative format that preserves all image data with no loss, but PNG files are typically two to three times larger than JPG files of the same photo. PNG is better for screenshots, diagrams, and images with text because it keeps sharp edges. GIF is an older format used mainly for straightforward animations. HEIC is a newer format that compresses photos smaller than JPG while keeping better quality, but many devices and websites still do not support it, so sharing HEIC files often requires converting them first.

RAW is the format that professional cameras use — it stores all the data the camera sensor captured, with no compression at all. RAW files are enormous and require special software to view and edit, so they are only used by photographers who need to adjust images after shooting. For everyday use, JPG is the practical choice.

What happens when you edit and re-save a JPG

Every time you open a JPG file, edit it, and save it again as a JPG, the compression happens a second time. The first compression already threw away some data, and the second compression throws away more. After three or four cycles of editing and saving, the image quality becomes noticeably worse — colors shift, edges blur, and the blocky compression artifacts become visible.

To avoid this, edit your photos in a format that does not compress, like PNG or TIFF, and only save to JPG as the final step. If you do not have access to those formats, edit your JPG once and save it with a new filename rather than overwriting the original. Most photo editing software (like Photoshop, GIMP, or even basic phone apps) can save to multiple formats, so you have options.

Some cameras and phones offer a "live photo" or "RAW" mode that stores the uncompressed original alongside the JPG. If your device has this option, turning it on gives you a backup to edit from if you need to make changes later.

How to recognize a JPG file and check its size

A JPG file has a filename that ends in .jpg or .jpeg — for example, "vacation-photo.jpg" or "family-portrait.jpeg". Both extensions mean the same thing; .jpg is shorter and more common in modern files, while .jpeg is the original full name. On Windows, you can right-click the file and choose Properties to see the file size in bytes, kilobytes, or megabytes. On Mac, right-click and choose Get Info. On a phone, open the Files app (iPhone) or Files by Google (Android) and tap the file to see its size.

A typical photo from a modern phone camera is 2 to 5 megabytes as a JPG. If a JPG file is much larger than that — 20 or 30 megabytes — it was probably saved at a very high quality setting or the original image was extremely large. If a JPG is smaller than 500 kilobytes, it was probably compressed heavily and may show visible quality loss.

Converting between JPG and other formats

You can convert a JPG to PNG, HEIC, or other formats using free online tools, your phone's built-in tools, or photo software. On Windows, right-click a JPG file, choose "Open with", and select Photos or Paint. In the Photos app, click the menu and choose "Save as" to pick a different format. On Mac, open the image in Preview, go to File, and choose Export to select a new format. On iPhone, open the image in Photos, tap Edit, then tap the three dots and choose Convert to HEIC or JPEG.

Converting a JPG to PNG does not recover the data that JPG compression already threw away — the PNG file will look identical to the JPG, just larger. To truly improve quality, you would need the original uncompressed file or RAW data from the camera. Converting from PNG or HEIC to JPG will make the file smaller but may introduce visible compression artifacts if the original image had sharp lines or text.

Frequently Asked Questions

Is JPG the same as JPEG?

Yes. JPEG is the official name (Joint Photographic Experts Group, the committee that created the format). JPG is a shorter version that became common because early Windows systems limited filenames to three letters after the dot. Both refer to the same format and work identically.

Why do my JPG photos look blurry when I zoom in?

JPG compression creates blocky artifacts that become visible when you zoom in, especially in areas with gradual color changes like skies or skin tones. This is normal and happens because the format discards fine detail to make the file smaller. Zooming in on a PNG or RAW file of the same photo would show more detail.

Can I convert a JPG back to its original quality?

No. Once JPG compression throws away data, that data is gone permanently. Converting the JPG to another format or using editing software cannot recover it. You would need the original uncompressed file or the RAW data from the camera.

What quality setting should I use when saving a JPG?

For web use and sharing, a quality setting of 75 to 85 is usually the best balance — the file stays small enough to load quickly but looks sharp enough for most purposes. For photos you plan to print, use 90 or higher. Below 60, compression artifacts become visible to most people.

Why does my phone save photos as HEIC instead of JPG?

Newer iPhones default to HEIC because it compresses photos smaller than JPG while keeping better quality. However, many websites and older devices do not support HEIC, so you may need to convert to JPG before sharing. You can change this in Settings by going to Camera, then Formats, and choosing Most Compatible (JPG) instead of High Efficiency (HEIC).