Image Compressor

Joint Photographic Experts Group · .jpg, .jpeg

The JPG format, explained

JPG is the universal format for photographs on the web — and the right answer about 80% of the time.

Last reviewed: June 2026

Compression
Lossy
Type
Raster
Transparency
No
Animation
No

JPG (also written JPEG) has been the dominant image format on the web since the mid-1990s and remains the right choice for most photographic content today. Its compression algorithm — Discrete Cosine Transform — discards image data the human eye is unlikely to notice, which is why a 10 MB camera RAW becomes a 1 MB JPG with no visible quality loss.

JPG's main downsides are well known: no transparency, lossy compression that compounds with each save, and visible artefacts (banding, blockiness) at aggressive quality settings. For graphics, screenshots, or anything with sharp edges or transparency, PNG or WebP is the better choice — but for photographic content uploaded to the web, JPG remains the safe default.

Modern alternatives (WebP, AVIF) compress better still — typically 25–35% smaller than JPG at equivalent quality — but JPG retains an edge in universal compatibility. Every device, every browser, every social platform, every email client renders JPG correctly. The conversion tools linked below let you trade off between maximum compatibility (JPG) and maximum efficiency (WebP / AVIF) for your use case.

History — introduced 1992

By: Joint Photographic Experts Group (an ISO/IEC committee)

JPEG was standardised in 1992 and quickly became the universal photographic format thanks to a balance of strong compression, good visual quality, and unencumbered patent licensing. The original patents have all expired. The format is technically named JPEG; .jpg is just a Windows-era three-letter extension for the same thing.

How it works

JPG converts an image from RGB into the YCbCr colour space (separating brightness from colour), then applies the Discrete Cosine Transform to 8×8 pixel blocks. The transform represents each block as a sum of frequency components, with low-frequency components (broad colour) prioritised over high-frequency components (sharp edges and texture).

Quantisation then rounds the frequency coefficients — coarsely at low quality, finely at high quality — discarding the parts the eye is least likely to notice. The result is dramatically smaller than the original, at the cost of some image data being permanently lost.

Strengths and weaknesses

Strengths

  • Universal compatibility — every browser, OS, social platform and email client renders JPG correctly.
  • Excellent compression for photographic content — typically 10–20× smaller than the same image as PNG.
  • Tunable quality — the quality slider gives precise control over the size / quality trade-off.
  • Progressive encoding — large JPGs can render progressively as they load, improving perceived page speed.

Weaknesses

  • No transparency support. The format flattens any alpha channel to a solid colour (white by default).
  • Lossy compression compounds — each save discards more data, so editing pipelines should keep the source in a lossless format (PNG / TIFF) until export.
  • Visible artefacts at low quality — banding in skies and blocky edges around sharp text.
  • Larger than WebP / AVIF at equivalent quality.

When to use it

  • Photographs published to the web, social media, or email
  • Phone-camera output that needs sharing before further editing
  • Photographic content with broad audience (universal compatibility)
  • Print imagery where universal compatibility matters more than file size

When NOT to use it

  • Graphics with sharp edges or text — JPG produces visible artefacts. Use PNG or WebP.
  • Anything requiring transparency — JPG has no alpha channel. Use PNG, WebP or AVIF.
  • Source files for editing pipelines — re-saving JPG compounds quality loss.
  • Logos, icons or other line art — vector (SVG) or lossless raster (PNG) is sharper.

Browser support

Global coverage: 100%

BrowserSupport
ChromeAll versions
FirefoxAll versions
SafariAll versions
EdgeAll versions
Legacy / notesUniversal — even IE6 renders JPG correctly.

Performance considerations

  • JPG decode is hardware-accelerated on every modern device — the fastest decode of any web image format.
  • Progressive JPG renders incrementally during download, improving perceived loading speed on slow connections.
  • Aim for ~80–85 quality for photographic content. Higher quality doubles file size with no visible benefit.

SEO considerations

  • Most search engines treat JPG as the default 'photographic' format — no penalty for using it.
  • JPGs are well-handled by image search indexes. Always include descriptive alt text and a meaningful filename.
  • Use srcset to serve multiple JPG sizes; the browser picks the best one for the viewport.

Common mistakes

  • Saving JPG at quality 100 — the file is needlessly large with no visible improvement over quality 85.
  • Editing and re-saving a JPG repeatedly. Each save compounds compression artefacts.
  • Using JPG for screenshots or graphics — produces visible blockiness around text and sharp edges.
  • Uploading huge JPGs straight from a camera or phone, instead of resizing to a sensible web max-width first.

Frequently asked questions

Is JPG the same as JPEG?
Yes. JPEG is the technical name (the standard, established in 1992); .jpg is just the three-letter Windows-era file extension. Modern systems treat .jpg and .jpeg as identical.
What quality setting should I use for JPG?
Quality 80–85 is the sweet spot for photographic content. The file is dramatically smaller than quality 100 with no visible difference at typical viewing sizes.
Does JPG support transparency?
No. JPG has no alpha channel. Any transparent pixels in the source get flattened to a solid background colour (white by default).
Why does my JPG look blocky?
Either the quality setting is too low (try ≥ 80), or the image has been re-saved as JPG multiple times — each save compounds compression artefacts. Convert to PNG or WebP if you need to edit further.
Should I use JPG or WebP for my website?
WebP is typically 25–35% smaller than JPG at equivalent quality and is supported in every modern browser. Use WebP for photographic content on websites where you control the delivery; use JPG when uploading to platforms that compress everything anyway (Instagram, Facebook, etc.).