What is JPG (JPEG)?

Learn everything about JPG/JPEG format - how it works, compression settings, pros and cons, and when to use it. The definitive JPG format guide.

The JPG image format explained: how it works, its specs, and when to use it.

JPG

What is JPG (JPEG)?

1992 Year CreatedLossy Compression Type#1 Most Used Image Format

JPG (also written as JPEG - Joint Photographic Experts Group) is a lossy image compression format created in 1992. It is the most widely used image format on the internet, in digital cameras, and on smartphones worldwide.

The format works by discarding image data that the human eye is least likely to notice, achieving dramatic file size reductions. A high-quality JPEG can be 10x smaller than an uncompressed version of the same image with virtually no visible quality loss.

How JPG Compression Works

JPG (also written JPEG, after the Joint Photographic Experts Group that created it) is the world's most common image format, and it earned that place by being extremely good at one thing: making photographs small. It does this through lossy compression, deliberately discarding image detail that the human eye is unlikely to notice in order to dramatically shrink the file. A photo saved as JPG is often a tenth the size of the same image as PNG, with no visible difference at sensible quality settings.

The compression exploits the limits of human vision. It works by converting the image into frequency information (using a mathematical operation called the discrete cosine transform), then throwing away the high-frequency detail our eyes are least sensitive to, particularly fine color variation, since people notice changes in brightness far more than changes in color. The remaining data is then packed efficiently. This is why JPG is brilliant for photos, which are full of smooth gradients and subtle tones, and poor for sharp-edged graphics, where discarding high-frequency detail produces visible smearing.

A quality setting (typically 0 to 100) controls how aggressively JPG discards data. At high quality (around 85 to 95) the loss is invisible; as you lower it, the file shrinks further but artifacts appear: blocky 8x8 squares, halos around sharp edges, and a general softening. The practical sweet spot for most photos is 80 to 90, small files with no obvious degradation.

The Generation Loss Trap

The single most important thing to understand about JPG is that its loss is permanent and cumulative. Every time you open a JPG, edit it, and save it again as JPG, the lossy compression runs again and discards a little more detail, a problem called generation loss. Save the same JPG a dozen times and it visibly degrades, even at high quality. This is why JPG should be a final delivery format, not a working format. For editing, keep a lossless master (PNG, TIFF, or your camera's RAW file) and export a fresh JPG each time, rather than repeatedly re-saving the same JPG.

History and Variants

The JPEG standard was published in 1992 and quickly became the default for digital photography and the web, a position it has held for three decades thanks to universal support and excellent compression of photographic content. The .jpg and .jpeg extensions refer to the same format; the shorter .jpg exists because older Windows systems limited extensions to three characters.

JPG also defines a progressive mode, where the image loads as a low-resolution version that sharpens as more data arrives, useful on slow connections. JPG files usually carry rich EXIF metadata, the camera settings, date, and GPS location embedded by digital cameras and phones, which is one reason it remains the standard for photography. Newer formats like WebP and AVIF compress better, but none has displaced JPG's universal compatibility.

JPG vs PNG vs WebP

The rule of thumb is simple. Use JPG for photographs and any image that is mostly smooth tones and gradients. Use PNG for screenshots, logos, text, line art, and transparency, where JPG's lossy compression would smear sharp edges and where you need a transparent background (which JPG cannot do at all). For the web, WebP is the modern upgrade: it compresses photos smaller than JPG at the same quality and adds transparency, so where browser support allows it can replace JPG with smaller files. JPG's enduring advantage is that it works absolutely everywhere, with no compatibility questions.

JPG vs Other Image Formats

FeatureJPGPNGWebPAVIF
CompressionLossy (DCT)[1]LosslessLossy & losslessLossy & lossless
TransparencyNone[2]Full alphaFull alphaFull alpha
Color depth8-bit/channelUp to 16-bit8-bitUp to 12-bit (HDR)
Compression efficiencyBaselineLarger files~25-34% smaller than JPGSmallest
Browser supportUniversal[1]UniversalAll modern browsersMost modern browsers
Best forPhotographsLogos, screenshotsModern web imagesHigh-efficiency web/HDR

JPG remains the universal default for photographs; newer formats like WebP and AVIF achieve smaller files at similar quality but with narrower (though now broad) support.

Pros & Cons of JPG

Advantages

Small File Sizes, Dramatic compression with minimal visible quality loss - up to 10x smaller than uncompressed.

Universal Support, Supported by every browser, device, camera, and operating system in existence.

Adjustable Quality, Quality setting 1 to 100 gives full control over the size vs quality trade-off.

Ideal for Photos, Perfect for photographs and complex images with millions of colors and gradients.

Disadvantages

Lossy Compression, Each save re-compresses the image causing gradual quality degradation over time.

No Transparency, Does not support alpha channel - transparent areas are filled with white.

Compression Artifacts, Blocky artifacts appear at low quality settings especially around sharp edges.

Bad for Graphics, Not suitable for text, logos, or flat-color graphics - use PNG or SVG instead.

Technical Specifications

Developer
Joint Photographic Experts Group[1]
File Extension
.jpg / .jpeg[1]
MIME Type
image/jpeg[1]
Compression
Lossy (DCT-based)[1]
Color Depth
24-bit (16.7M colors)[1]
Transparency
Not supported[1]

When to Use JPG

JPG is the right choice for most photographic content and anywhere file size is a priority.

Photography

Digital cameras and smartphones save photos as JPG by default. Perfect for portraits, landscapes, and natural scenes.

Web Images

Smaller file sizes mean faster page loads. Use JPG for all photographic web content.

Social Media

Most social platforms re-compress uploads to JPG. Upload as JPG for predictable quality control.

Email & Sharing

Small JPG files are easy to share via email and messaging apps without hitting size limits.

References

  1. JPEG standard (ISO/IEC 10918) - JPEG Committee
  2. JPEG image type - MDN Web Docs
  3. JPEG File Interchange Format Family - Library of Congress
  4. JPEG - Wikipedia

How to open a JPG file

Software for working with JPG files can be categorized into professional tools, free/open-source options, browser-based applications, and built-in system utilities. Professional tools like Adobe Photoshop cater to users needing advanced editing features, while free/open-source options like GIMP are suitable for those on a budget. Browser-based applications offer convenience for quick edits without installation, and built-in utilities provide basic functionality for casual users.

When choosing software for JPG specifically, factors such as feature fidelity, the balance between editing and viewing capabilities, cost models, and platform compatibility are crucial. Users should consider their export needs, as some applications may offer better support for various formats. Additionally, understanding when to convert JPG to another format for specific use cases can influence the decision on which tool to use.

Adobe Photoshop 2023

Windows, macOSSubscription

Adobe Photoshop is a leading professional image editing software that excels in working with JPG files. It offers extensive editing capabilities, including advanced color correction, retouching, and layer management, ensuring high fidelity when manipulating JPG images.

Key features
  • Full layer and mask editing
  • Advanced color correction tools
  • Non-destructive editing capabilities
  • Extensive filter and effect options
  • Batch processing for multiple files
Strengths
  • Industry-standard for professional editing
  • Powerful tools for detailed adjustments
  • Robust support for various image formats
Limitations
  • High subscription cost
  • Steeper learning curve for beginners

Exports to: PNG, TIFF, PSD, PDF, WebP

Best for: Choose Adobe Photoshop for comprehensive JPG editing and professional-grade features.

Visit Adobe Photoshop →

GIMP 2.10.34

Windows, macOS, LinuxFree (GPL)

GIMP is a powerful open-source image editor that provides a wide range of features for working with JPG files. It supports advanced editing techniques similar to Photoshop, allowing users to manipulate JPG images with high fidelity and flexibility.

Key features
  • Customizable user interface
  • Advanced selection tools
  • Support for layers and masks
  • Extensive plugin support
  • Batch processing capabilities
Strengths
  • Completely free and open-source
  • Highly customizable with plugins
  • Cross-platform compatibility
Limitations
  • Less intuitive for new users
  • Performance can lag with large files

Exports to: PNG, TIFF, BMP, GIF, PDF

Best for: GIMP is ideal for users seeking a free, powerful alternative for JPG editing without the cost.

Visit GIMP →

IrfanView 4.60

WindowsFree / Paid

IrfanView is a lightweight image viewer and editor that supports JPG files with basic editing features. It is designed for fast viewing and simple edits, making it suitable for users who need quick access to JPG images without extensive editing capabilities.

Key features
  • Basic image editing tools
  • Batch conversion and renaming
  • Support for plugins to extend functionality
  • Slideshow creation
  • Image format conversion
Strengths
  • Extremely fast and lightweight
  • Simple interface for quick tasks
  • Batch processing for efficiency
Limitations
  • Limited advanced editing features
  • Windows-only platform

Exports to: PNG, BMP, TIFF, GIF, PDF

Best for: IrfanView is perfect for users needing a fast, straightforward tool for viewing and basic editing of JPG files.

Visit IrfanView →

Pixlr 2023

All (browser)Free / Paid

Pixlr is a web-based photo editing tool that allows users to edit JPG files directly in their browser. It offers a range of features for both casual and more advanced editing, making it accessible for users without needing to install software.

Key features
  • Layer-based editing capabilities
  • Wide variety of filters and effects
  • Text and shape tools for customization
  • Cloud storage integration
  • Collage and design templates
Strengths
  • No installation required, browser-based
  • User-friendly interface for quick edits
  • Accessible from any device with internet
Limitations
  • Limited features in free version
  • Dependent on internet connection

Exports to: PNG, JPG, WEBP, PDF

Best for: Pixlr is ideal for users looking for a convenient, browser-based solution for editing JPG files without installation.

Visit Pixlr →