1. Home
  2. Guides
  3. What is a JFIF file?

JFIF · Image formats

What is a JFIF file?

A JFIF file is a JPEG image. JFIF stands for JPEG File Interchange Format, the specification that describes how JPEG-compressed data is packaged into a file, and virtually every .jpg on your computer is a JFIF file on the inside. The unfamiliar extension appears because a Windows registry entry maps the image/jpeg MIME type to .jfif instead of .jpg, and several Windows, Office and browser updates have set it that way. Nothing is wrong with the image. Renaming it to .jpg makes it open in almost anything; converting it produces a file that passes even the strictest upload check.

JFIF and JPEG are two halves of the same thing

The confusion here is genuinely the standards bodies fault, not yours. What people call "JPEG" is a compression method, standardised in 1992 as ITU-T T.81. That document specifies how to turn an image into compressed data, and stops there. It does not say how to store that data in a file, what colour space to assume, or how to record the aspect ratio.

JFIF was written to fill the gap. It defines the container: a file header, a marker structure, a default colour space of YCbCr, and density information. It became the near-universal way of writing JPEG data to disk, which is why your .jpg files have been JFIF files all along without anyone mentioning it.

There is one common alternative worth knowing about. Exif is a competing container for the same JPEG data, used by essentially every digital camera, and it is what carries the shutter speed, GPS coordinates and orientation flag. A photograph from a camera is usually Exif; an image saved from a web browser is usually JFIF. Both are JPEG underneath and both normally arrive named .jpg.

Need to convert the file?

JFIF to JPG

Why Windows suddenly started producing them

Windows keeps a registry entry that maps each MIME type to the file extension it should use when saving. For JPEG images the key is HKEY_CLASSES_ROOT\MIME\Database\Content Type\image/jpeg, and it holds a value named Extension.

That value is supposed to read .jpg. On a large number of machines it reads .jfif instead. Various Windows updates, Office installations and browser versions have set it, and once it is set, every save from a browser or an email client obediently uses it. The browser does not choose the extension; it asks Windows, and Windows answers with whatever is in that key.

So the file you downloaded is exactly the JPEG the website served. Only the name it was given on the way to your disk is unusual.

Three fixes, and when each one is right

Rename it. Because the contents are already a valid JPEG, changing photo.jfif to photo.jpg makes it open in essentially everything. For a single file this is the fastest fix available and you do not need any tool at all. Windows will warn you about changing the extension; the warning does not apply here, because the extension was the thing that was wrong.

Convert it. Renaming only changes the label. Some upload forms read the first bytes of a file rather than trusting its name, and while a renamed JFIF will pass that check too, a re-encode removes any question — and it handles a folder of them at once, which renaming individually does not.

Fix the registry, if it keeps happening. Setting that Extension value back to .jpg stops new downloads being misnamed. This is the only fix that addresses the cause rather than the symptom, and it is worth doing if you save images from the web regularly. Editing the registry carries the usual risk of editing the registry, so it is the last option rather than the first.

Why software refuses a file it could easily read

It is reasonable to wonder why an application that reads JPEG every day rejects a JFIF that is byte-identical to one. The answer is that most software decides what it will accept from a list of extensions, before it ever opens the file. That list was written years ago and .jfif was not on it.

This is the same mechanism behind the wider family of upload rejections — HEIC from an iPhone, WebP saved from a website, AVIF from a modern site. In every case the file is fine and the allowlist is out of date.

Frequently asked questions

Is JFIF the same as JPEG?

Effectively yes. JPEG is the compression; JFIF is the container that compression is normally stored in. A .jfif and a .jpg holding the same image are byte-for-byte identical, and only the extension differs.

Can I just rename .jfif to .jpg?

Yes, and for a single file it is the quickest fix there is. The contents are already a valid JPEG, so almost every application will open it once the name matches what it expects.

Does converting JFIF to JPG lose quality?

Re-encoding is lossy, so strictly there is a small loss, though at quality 0.92 it is not visible on a photograph. Renaming loses nothing at all because no pixel is touched, which is why renaming is the better choice when you only have one file.

Why did my browser save a .jfif instead of a .jpg?

Because a Windows registry entry told it to. The MIME-to-extension mapping for image/jpeg was set to .jfif by an update, and browsers use whatever that entry says when naming a downloaded file.

Will a .jfif file open on a Mac or phone?

Generally yes. macOS, iOS and Android identify images by inspecting the file rather than trusting the extension, so a JFIF opens normally. The problem is largely confined to Windows software and to upload forms that check the name.

Is a JFIF file safe to open?

As safe as any JPEG, which is to say yes under normal circumstances. It is not an unusual or suspicious format — it is the ordinary one, wearing a name you have not seen before.