The short answer
- JPEG is a continuous-tone still-image coding family that commonly compresses photographs with lossy DCT coding, although the standard also includes arithmetic, lossless, and hierarchical options.
- On Windows or macOS, double-click the JPEG and choose an installed image viewer if no default application is assigned. On a phone, tap the file and select an available image-viewing application. If it fails, confirm the extension and image/jpeg type where available, check that the stream begins FF D8 FF, and try a current decoder that recognizes the file's coding options and metadata.
- JPEG is not inherently executable, but viewing it still invokes an image parser. Specially crafted JPEG files have caused buffer overflows and denial-of-service failures, including during automatic thumbnail generation. Treat unexpected images cautiously and use patched, resource-limited decoders, especially for untrusted files.
JPEG Image File
JPEG 1 is standardized as ISO/IEC 10918 and ITU-T T.81. Files commonly use .jpg, .jpeg, or .jpe and the registered image/jpeg media type. A JPEG stream starts with FF D8; FF D8 FF is a suitable family-level signature. JFIF is an interchange wrapper whose APP0 marker follows the Start of Image marker, while other APPn segments can contain Exif, XMP, ICC profiles, or comments.
For exact pixel preservation, convert JPEG to a lossless target and avoid another lossy JPEG encode. Baseline DCT JPEG is lossy, so repeated decoding, editing, and re-encoding can discard more image information. A successful conversion does not establish that the image or its metadata is trustworthy.
How to open it
On Windows or macOS, double-click the JPEG and choose an installed image viewer if no default application is assigned. On a phone, tap the file and select an available image-viewing application. If it fails, confirm the extension and image/jpeg type where available, check that the stream begins FF D8 FF, and try a current decoder that recognizes the file's coding options and metadata.
On Windows or macOS, double-click the JPEG and choose an installed image viewer if no default application is assigned. On a phone, tap the file and select an available image-viewing application. If it fails, confirm the extension and image/jpeg type where available, check that the stream begins FF D8 FF, and try a current decoder that recognizes the file's coding options and metadata.
For exact pixel preservation, convert JPEG to a lossless target and avoid another lossy JPEG encode. Baseline DCT JPEG is lossy, so repeated decoding, editing, and re-encoding can discard more image information. A successful conversion does not establish that the image or its metadata is trustworthy.
File safety
JPEG is not inherently executable, but viewing it still invokes an image parser. Specially crafted JPEG files have caused buffer overflows and denial-of-service failures, including during automatic thumbnail generation. Treat unexpected images cautiously and use patched, resource-limited decoders, especially for untrusted files.
An unknown sender, a name ending in two extensions, or contents that do not match the extension — check before you open it.
Converting it
For exact pixel preservation, convert JPEG to a lossless target and avoid another lossy JPEG encode. Baseline DCT JPEG is lossy, so repeated decoding, editing, and re-encoding can discard more image information. A successful conversion does not establish that the image or its metadata is trustworthy.
Convert a copy, never the original, then compare quality, metadata, and layout against what you started with.
Common questions
What is a JPEG image file used for?
JPEG is a standardized family for coding continuous-tone still images and is especially familiar as the lossy DCT format used for photographs. It also defines arithmetic, lossless, and hierarchical coding options.
How do I open a JPEG file?
Open it with an installed image viewer. If no application is associated with the file, choose one that supports image/jpeg and the JPEG coding options present in the stream.
How do I open a JPEG file on Windows?
Double-click the file; if Windows asks for an application, select an installed image viewer. If opening fails, update the viewer and verify that the file starts with the JPEG marker FF D8 FF.
How do I open a JPEG file on macOS?
Double-click the file or choose an installed image viewer from the Open With menu. A failure can indicate damaged data or a coding or metadata feature the selected decoder does not handle.
How do I open a JPEG file on a phone?
Tap the downloaded file and select an available image-viewing application. Keep the operating system and viewer current before opening an image from an untrusted source.
Why will my JPEG image not open even though it has a .jpg extension?
An extension does not prove the contents are JPEG. Check for the FF D8 FF family signature; the stream may instead be truncated, damaged, or use coding or metadata that the decoder does not recognize.
What is the difference between JPG and JPEG, and which should I use?
Both extensions are listed for the same JPEG format family and image/jpeg media type. Choose the extension required by the receiving system; changing only the filename does not change the encoded image.
Can I convert JPEG to PNG without losing more image quality?
A lossless target can avoid another lossy JPEG encode and preserve the pixels produced by decoding the source. It cannot restore image information already discarded by earlier lossy JPEG compression.
Is a JPEG image from an email safe to open?
Not automatically. JPEG is not inherently executable, but crafted images have exploited image loaders and thumbnail paths. Use patched software and handle unexpected files with resource-limited decoders.
What does the JPEG file header FF D8 FF mean?
FF D8 is the Start of Image marker, and the next marker begins with FF. The following byte varies by wrapper; a JFIF-specific stream continues with an APP0 marker, length field, and the JFIF identifier followed by 00.
Related formats
Sources
JPEG 1 — Overview · JPEG Committee (ISO/IEC JTC 1/SC 29/WG 1)
IANA Media Types Registry · Internet Assigned Numbers Authority (IANA)
JPEG File Interchange Format Family · Library of Congress Digital Formats
ITU-T T.86 (V2): APPn markers · International Telecommunication Union (ITU-T)
ITU-T T.873 (V3): JPEG Reference Software · International Telecommunication Union (ITU-T)
CVE-2026-5201 Detail · NIST National Vulnerability Database