What is JPEG?

Discover what JPEG files are, their format and extension, how they function, and their uses compared to other formats in this complete guide.

The JPEG image format explained: how it works, why JPEG and JPG are the same thing, and when to use it.

JPEG

What is JPEG?

Complete guide to the JPEG file format

Created
1992
Type
Image
Common Use
Web photos

JPEG and JPG Are the Same Format

The first thing to clear up is the most common question: JPEG and JPG are the same thing. There is no technical difference between a file named photo.jpeg and one named photo.jpg, the bytes inside are identical, and every program treats them the same way. The reason two extensions exist is purely historical. The format is named after the Joint Photographic Experts Group, the committee that created it, so the natural extension is .jpeg. But early versions of Windows (MS-DOS and Windows up to the FAT file system era) limited file extensions to three characters, so .jpeg was shortened to .jpg. That three-letter habit stuck, and today both extensions are completely interchangeable. You can rename a .jpeg to .jpg (or back) and nothing about the image changes.

So when a site offers a "JPEG converter" or a "JPG converter," they are the same tool. When a camera saves .JPG and an app exports .jpeg, they produce the same kind of file. There is nothing to convert between them, and no quality difference to worry about. The rest of this page uses "JPEG" to mean the format and "JPG" only when referring to the extension, but everything applies equally to both.

How JPEG Compression Works

JPEG is the world's most widely used photo format because of how cleverly it throws data away. It is a lossy format, meaning it permanently discards some image information to make files dramatically smaller, and it is tuned to discard exactly the detail human eyes are least likely to miss. The process works in stages. First the image is converted to the YCbCr color space, separating brightness (luminance) from color (chrominance), because our eyes are far more sensitive to brightness than to color. The color channels can then be subsampled, stored at lower resolution, with little visible effect.

Next, JPEG divides the image into 8x8 pixel blocks and applies a Discrete Cosine Transform to each, converting the block from pixels into frequency coefficients that describe how detail varies across it. A quantization step then divides those coefficients by values from a quality-dependent table, rounding away the fine, high-frequency detail the eye barely registers. This quantization step is where the loss, and almost all the size savings, happen: a lower quality setting means more aggressive rounding, smaller files, and more visible artifacts. Finally the surviving data is packed efficiently with entropy coding. The "quality" slider you see when saving a JPEG simply controls how aggressive that quantization is.

The Strengths and the Catch

JPEG's great strength is photographs. For images with smooth gradients and millions of subtle colors, a sunset, a portrait, a landscape, JPEG produces remarkably small files at quality good enough that the loss is invisible. This is why it became the default for digital cameras, the web, and photo sharing, and why it remains universally supported by every device, browser, and program in existence. No other format can claim that reach.

The catch is two-fold. First, JPEG is poor for sharp-edged graphics: logos, text, line art, and screenshots develop ugly "ringing" halos and blocky noise around hard edges, because the format is built for gradual photographic transitions, not crisp lines. For those, PNG is the right choice. Second, JPEG loss is cumulative: every time you open a JPEG, edit it, and re-save, it is compressed again and loses a little more quality. This "generation loss" is why you should keep an original master and avoid repeatedly editing and re-saving the same JPEG.

The Standard, JFIF, and EXIF

The core JPEG coding system was published as ITU-T Recommendation T.81, equivalent to ISO/IEC 10918-1. That standard defines only the compressed data stream, so a separate wrapper is needed to store it as an actual file. The near-universal wrapper is JFIF (the JPEG File Interchange Format), which is what almost every .jpg file actually is. Cameras and phones typically use a closely related wrapper, Exif, which embeds metadata such as the camera model, exposure settings, date, and GPS location alongside the image. This is why a JPEG straight from a phone can carry location data, something to be aware of before sharing photos publicly.

JPEG vs PNG vs WebP

Against PNG, JPEG wins decisively on photographs (far smaller files) but loses on graphics and anything needing transparency or perfectly sharp edges, JPEG has no transparency support at all. Against newer formats like WebP and AVIF, JPEG produces noticeably larger files for the same visual quality, since those formats use more modern compression. WebP and AVIF are the better technical choice for the web today, but JPEG's unbeatable universal compatibility keeps it the safe default when a file must open absolutely everywhere. In short: keep using JPEG for photos that need to travel widely, reach for PNG for crisp graphics, and consider WebP when you control the platform and want smaller files.

JPEG vs Other Image Formats

FeatureJPEGPNGWebP
TypeRasterRasterRaster
CompressionLossy[1]LosslessLossy & lossless
TransparencyNo[5]YesYes
Color depth8-bit/channel[1]Up to 16-bit8-bit/channel
Standardized byISO/IEC, ITU-T[1]W3C, ISOGoogle
Best forPhotographsGraphics, transparencyWeb images

JPEG excels at compressing photographic images but lacks transparency and lossless options that PNG and WebP provide.

Pros and Cons

Advantages

  • Universal Compatibility Supported by every browser, camera, phone, and operating system without exception.
  • Excellent Compression Reduces photo file sizes significantly with minimal visible quality loss at high quality settings.
  • Adjustable Quality Quality settings from 1 to 100 let you tune the size-to-quality balance for any use case.
  • Identical to JPG Full interchangeability with .jpg means zero compatibility concerns when switching extensions.

Disadvantages

  • Lossy Compression Data is permanently discarded on each save, causing gradual quality degradation with repeated edits.
  • No Transparency Does not support alpha channels - transparent areas are rendered as solid white.
  • Compression Artifacts Blocky artifacts and color banding appear at low quality settings, especially around sharp edges.
  • Not Ideal for Graphics Text, logos, and flat-color artwork look worse in JPEG than in PNG or SVG.

Technical Details

DeveloperJoint Photographic Experts Group[1]
File Extension.jpeg / .jpg[1]
MIME Typeimage/jpeg[1]
CompressionLossy (DCT-based)[1]
Color Depth24-bit (16.7 million colors)[1]
TransparencyNot supported[1]
Max ResolutionUp to 65,535 x 65,535 pixels[1]

When to Use JPEG

Here are the most common situations where JPEG is the right choice:

  1. Web PhotographyUse JPEG for all photographic content on websites where fast loading is important.
  2. Digital Camera OutputDefault format for most digital cameras and smartphones when shooting in standard mode.
  3. Email AttachmentsSmall JPEG files are easy to attach to emails without hitting size restrictions.
  4. Social Media UploadsMost platforms re-encode uploads as JPEG anyway, so starting with JPEG gives you predictable results.

References

  1. ITU-T Recommendation T.81 (ISO/IEC 10918-1) JPEG specification - ITU/W3C
  2. JPEG Image Encoding Family - Library of Congress
  3. JFIF, JPEG File Interchange Format, Version 1.02 - Library of Congress
  4. JPEG 1 overview and specifications - JPEG Committee
  5. JPEG - Wikipedia

How to open a JPEG file

JPEG files are widely supported across various software categories, including professional editing tools, free and open-source applications, browser-based viewers, and built-in operating system utilities. Professional tools like Adobe Photoshop cater to advanced users needing extensive editing capabilities, while free and open-source options like GIMP appeal to budget-conscious users. Browser-based solutions provide quick access for casual viewing, and built-in tools offer basic functionality for everyday users.

When choosing software for JPEG files, important factors include feature fidelity, the balance between editing and viewing capabilities, cost models, and platform compatibility. Users should consider whether they need advanced editing features or simple viewing options, as well as the need for exporting to different formats. In some cases, converting JPEGs to other formats may be preferable for specific use cases, such as reducing file size or improving compatibility.

Adobe Photoshop 2024

Windows, macOS$20.99/mo

Adobe Photoshop is a professional image editing software that excels in handling JPEG files. It offers extensive editing capabilities, including layer manipulation and advanced color correction, ensuring high fidelity when working with JPEG images.

Key features
  • Advanced layer and mask editing
  • Non-destructive editing capabilities
  • Extensive color correction tools
  • Support for 16-bit color depth
  • Batch processing for multiple JPEGs
Strengths
  • Industry-standard for professional editing
  • Comprehensive toolset for JPEG manipulation
  • Regular updates with new features
Limitations
  • Subscription model can be costly
  • Steep learning curve for beginners

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

Best for: Choose Adobe Photoshop for professional-grade JPEG editing with extensive features and high fidelity.

Visit Adobe Photoshop →

GIMP 2.10.34

Windows, macOS, LinuxFree (GPL)

GIMP is a powerful open-source image editor that provides robust tools for working with JPEG files. It supports various editing features and maintains a high level of fidelity, making it a suitable alternative to paid software.

Key features
  • Layer-based editing and manipulation
  • Customizable brushes and tools
  • Advanced color management options
  • Support for various color modes
  • Extensive plugin support for added features
Strengths
  • Completely free with no limitations
  • Highly customizable interface
  • Strong community support and resources
Limitations
  • Less intuitive than some commercial software
  • Performance can lag with large files

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

Best for: GIMP is ideal for users seeking a powerful, free alternative for JPEG editing without sacrificing features.

Visit GIMP →

IrfanView 4.60

WindowsFree for non-commercial use

IrfanView is a lightweight image viewer and editor that supports JPEG files efficiently. It is designed for quick viewing and basic editing tasks, making it suitable for users who need fast access to their JPEG images.

Key features
  • Batch conversion and renaming
  • Basic editing tools like cropping
  • Slideshow creation capabilities
  • Image format conversion
  • Support for plugins to extend functionality
Strengths
  • Extremely fast and lightweight
  • Simple interface for quick access
  • 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, no-frills JPEG viewer and basic editor.

Visit IrfanView →

Paint.NET 5.0.11

WindowsFree (donation-based)

Paint.NET is a free image and photo editing software that provides a user-friendly interface for working with JPEG files. It offers a balance of basic editing tools and advanced features, making it accessible for both beginners and more experienced users.

Key features
  • Layer support for complex edits
  • Simple and intuitive user interface
  • Basic effects and filters
  • Unlimited undo history
  • Support for plugins to enhance functionality
Strengths
  • User-friendly for beginners
  • Lightweight and fast performance
  • Active community with many plugins
Limitations
  • Windows-only availability
  • Fewer features than professional software

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

Best for: Paint.NET is suitable for users looking for an easy-to-use JPEG editor with essential features.

Visit Paint.NET →