JPG

What is a JPG file?

The universal photo format. Small files, no transparency, quality drops each time it is saved.

What JPG is

JPG is a binary format, meaningful only to a program that knows it. It stores a grid of pixels, so enlarging it past its own resolution softens it. It is used for photography, the web, email and handing a finished file over.

The extension is .jpg, and the full name is JPEG Image. Both matter less than what the file can hold, which is what the rest of this page is about.

Where JPG came from

Joint Photographic Experts Group published it in 1992. The specification is ITU-T T.81.

A format that has been readable for that long is a format worth trusting with something you want back in ten years.

The specification is public

It is published in full, so anyone can implement it from the document rather than by inspection, which is why it turns up in so many programs and why files written twenty years ago still open. A published specification is not the same thing as a royalty-free one: where a format wraps a codec, the patent licensing is a separate question the standard does not settle.

Detail is traded for size

JPG discards detail to stay small, and what it discards does not come back. That is the right trade for something being looked at and the wrong one for something being edited: each re-save takes another bite.

It cannot be transparent

JPG has nowhere to record transparency. Anything transparent in the source is filled with a solid colour on the way in — white, unless something chooses otherwise.

Colour it can describe

Up to 8 bits per channel. It can work in RGB, greyscale and YCbCr, the model video and JPEG compress in.

Eight bits per channel is what a screen shows and what nearly every delivery format carries.

There is a size limit worth knowing

JPG cannot describe an image larger than 65,535 pixels on a side. That is far beyond an ordinary photograph and well within reach of a stitched panorama or a high-resolution scan, which is exactly when people meet it.

It goes by other names too

Also known as JPEG. Worth knowing when searching for a program that handles it: the name on the specification and the name on the menu are not always the same one.

What opens JPG

Adobe Photoshop, GIMP and Preview read it, and so do most programs of the same kind.

If a file will not open, the format is rarely the problem — it is more often that the program predates it. Converting to something older is the reliable way past that, and it is what the rest of this site is for.

Opening it in a browser

Every current browser reads it.

That makes it a safe thing to put on a page or attach to a message without wondering what the other end has installed.

What it can carry besides the content

JPG can hold EXIF, XMP, IPTC, ICC profiles and GPS coordinates.

The GPS coordinates are the field worth thinking about before sending a file anywhere: they say where the photograph was taken, and almost nothing warns you that they are still in there.

It is a delivery format

JPG is meant to be handed over rather than worked in. Editing one is possible and rarely pleasant; the sane approach is to change the source and export again.

What goes wrong with it

The recurring complaints: it degrades a little every time it is re-saved.

None of these is a reason to avoid the format. They are the things worth knowing before you are surprised by one, which is a different claim and a more useful one.

Every save throws something away

JPEG is lossy by design. It analyses the image, decides which detail human vision is least likely to notice, and discards it. Saving the result again repeats the process on an image that has already been reduced, and the second pass has no idea what the first one removed.

This is why a photograph that has been edited, saved, re-opened and saved again for years looks progressively worse, and why an image passed through several social platforms arrives soft and blotchy. Each step is individually defensible and the damage accumulates. Nothing recovers it — converting a degraded JPEG to PNG preserves exactly the degradation.

The practical rule that follows

Edit from the least-processed copy you hold, and save to JPEG once, at the end. If a photograph needs three sizes, produce all three from the original rather than shrinking one from another.

Where a file will be edited repeatedly, keep a lossless working copy — PNG, TIFF or the raw file — and export JPEGs from it. This is the single piece of advice that prevents most JPEG disappointment, and it costs nothing but disk space.

What the quality slider is actually doing

It scales how aggressively the encoder rounds away fine detail. At 90 the result is visually indistinguishable from the source for almost any photograph. At 75 it is still good and noticeably smaller — this is where most sensible defaults sit. At 50 artefacts become visible on close inspection, and below 40 they are obvious.

The relationship between quality and size is not linear. Dropping from 100 to 90 typically halves the file for no visible change; dropping from 60 to 50 saves little and costs a lot. Working near 80 is the honest sweet spot for photographs on the web.

It is bad at exactly what it was not built for

JPEG was designed for photographs — continuous tones, gradual transitions, natural noise. Give it a screenshot, a logo, a diagram, a chart or text and it performs badly, because hard edges between flat colours are the thing its compression handles worst.

The visible result is ringing: faint halos and speckles around every letter and line, which look like dirt on the screen. PNG stores the same image losslessly and smaller. If an image is mostly text or flat colour, JPEG is the wrong format and no quality setting fixes it.

Chroma subsampling, and the red text problem

JPEG separates brightness from colour and usually stores colour at half resolution, because human vision is far more sensitive to brightness detail than to colour detail. That halves the data for the colour channels at almost no visible cost on a photograph.

On saturated colour against a contrasting background it is very visible — red text on white is the classic case, coming out furred and smeared. Encoders can be told to keep full colour resolution, which most call 4:4:4, and it is worth doing for anything with coloured graphics in it.

No transparency, and what that means in practice

JPEG has no alpha channel at all. Converting a transparent PNG to JPEG fills the transparent areas with a solid colour, normally white, permanently and without warning.

People usually discover this after placing the image on a coloured background, where a white rectangle appears around the logo. There is no setting to fix it and no way back from the JPEG. If any part of an image is meant to be see-through, JPEG cannot carry it.

Progressive JPEGs load differently

A baseline JPEG loads top to bottom. A progressive one arrives as a blurry whole that sharpens in passes, which feels faster on a slow connection because something recognisable appears immediately.

They are usually slightly smaller as well, and every browser and viewer supports them. The trade is marginally more work to decode, which is irrelevant on modern hardware. For images on a web page, progressive is the better default.

The metadata people forget is there

A JPEG from a phone or camera carries EXIF: model, lens, exposure settings, the exact date and time, and — where location services were on — the GPS coordinates of where it was taken. None of it is visible in the picture.

For photographs taken at home and posted publicly, that is a home address travelling in the file. Platforms differ in what they strip on upload and conversion tools differ in what they carry across, so it deserves a deliberate decision rather than a hopeful one. The orientation tag lives here too, which is why some images appear rotated in one program and upright in another.

Three decades old and still the default

JPEG was standardised in 1992 and has been comprehensively outperformed since — WebP is roughly 30 per cent smaller at the same quality, AVIF better again, and JPEG XL better still. None of them has displaced it.

The reason is that compatibility compounds. Every camera, phone, browser, printer, television, photo frame and piece of software made in three decades reads a JPEG, and each new device that supports it makes the next file more likely to be one. For a photograph handed to someone whose equipment you do not know, it remains the right answer.

The facts, in one place

Identifiers and provenance for the JPG format.
Extension.jpg, .jpeg, .jpe
Media typeimage/jpeg
Published byJoint Photographic Experts Group
First published1992
SpecificationITU-T T.81

Where these figures come from

The claims on this page are checkable, and these are the documents that settle them.