JPG vs JPEG MIME Type | What Is the Difference?
There is no difference between JPG and JPEG. They are the same file format with different file extensions. The correct MIME type for both is
This guide explains everything you need to know about JPG vs JPEG MIME type. You will learn the correct MIME types for common image formats, why file extensions matter, and how to use them correctly on your website.
image/jpeg. This guide explains everything you need to know about JPG vs JPEG MIME type. You will learn the correct MIME types for common image formats, why file extensions matter, and how to use them correctly on your website.

If you have ever built a website or worked with web servers, you have likely encountered MIME types. They tell the browser what kind of file it is receiving. But the difference between JPG and JPEG confuses many people. Let us clear that up right now.
Is MIME type JPG or JPEG?
The correct MIME type is
This is the official MIME type registered with IANA (Internet Assigned Numbers Authority). It applies to both .jpg and .jpeg file extensions. The MIME type does not change based on the file extension.
When your web server sends an image file, it should include this header:
image/jpeg. Not image/jpg. Not image/JPEG. It is always lowercase image/jpeg. This is the official MIME type registered with IANA (Internet Assigned Numbers Authority). It applies to both .jpg and .jpeg file extensions. The MIME type does not change based on the file extension.
When your web server sends an image file, it should include this header:
Content-Type:
image/jpeg
This tells the browser "this is a JPEG image" regardless of whether the file is named image.jpg or image.jpeg.
Are JPG and JPEG the same?
Yes, JPG and JPEG are exactly the same format. There is no difference in image quality, compression, or compatibility.
So why two names? It is purely historical. Early versions of Windows required three-letter file extensions. So JPEG became JPG. Mac and Linux systems allowed four-letter extensions, so they kept .jpeg.
Today, both extensions are widely supported everywhere. You can rename a .jpg file to .jpeg and it will open just fine. The image data inside is identical.
So why two names? It is purely historical. Early versions of Windows required three-letter file extensions. So JPEG became JPG. Mac and Linux systems allowed four-letter extensions, so they kept .jpeg.
Today, both extensions are widely supported everywhere. You can rename a .jpg file to .jpeg and it will open just fine. The image data inside is identical.
Remember: JPG and JPEG are the same format. The MIME type for both is
image/jpeg.
What is the MIME type of a TIFF file?
The MIME type for TIFF (Tag Image File Format) is
However, in practice, TIFF files are rarely used on the web because browsers do not display them natively. When you encounter a TIFF file online, it is usually offered as a download rather than displayed inline.
For completeness, here are common image MIME types:
image/tiff. This is the official registered type. However, in practice, TIFF files are rarely used on the web because browsers do not display them natively. When you encounter a TIFF file online, it is usually offered as a download rather than displayed inline.
For completeness, here are common image MIME types:
Is image/* a valid MIME type?
image/* is a valid wildcard pattern, but it is not an actual MIME type you would send in a Content-Type header. It is used in contexts like:- HTML accept attributes:
<input type="file" accept="image/*">– This tells the file picker to show all image types. - Server configuration: Sometimes used to apply rules to all image types.
- Programming: Used as a pattern to match multiple image MIME types.
However, you cannot send
image/* as a Content-Type header. That would be invalid. The header must contain a specific, registered MIME type like image/jpeg or image/png.What is a MIME type anyway?
MIME stands for Multipurpose Internet Mail Extensions. It was originally created for email attachments but is now used everywhere on the web.
A MIME type tells the browser or client what kind of file it is receiving. It has two parts: a type and a subtype, separated by a slash. For example:
A MIME type tells the browser or client what kind of file it is receiving. It has two parts: a type and a subtype, separated by a slash. For example:
text/html– HTML documentimage/jpeg– JPEG imageapplication/pdf– PDF document
When your web server sends a file, it includes a Content-Type header with the correct MIME type. If the MIME type is wrong, the browser might display the file incorrectly or offer it as a download.
Why MIME types matter for your website
Using the correct MIME types is important for several reasons:
- Correct display 📌 Browsers rely on MIME types to know how to handle files. An image with the wrong MIME type might not display at all.
- Security 📌 Incorrect MIME types can lead to security issues. For example, if a server sends HTML as
image/jpeg, it might bypass security filters. - SEO 📌 Search engines use MIME types to understand content. Incorrect types can affect indexing.
- User experience 📌 Files open correctly instead of downloading unexpectedly.
Common MIME type mistakes
Here are mistakes developers often make with MIME types:
- Using
image/jpginstead ofimage/jpeg📌 This is the most common error. Always useimage/jpeg, even for .jpg files. - Using uppercase letters 📌 MIME types are case-sensitive and should be lowercase.
image/JPEGis wrong. - Using the wrong type for SVG 📌 SVG is
image/svg+xml, notimage/svgorimage/svg-xml. - Sending
application/octet-streamfor images 📌 This tells the browser "I don't know what this is," forcing a download instead of display.
How to check and set MIME types on your server
On Apache servers
Add or check your .htaccess file:
AddType
image/jpeg .jpg .jpeg .jpe AddType
image/png .png AddType
image/webp .webp AddType
image/svg+xml .svg
On Nginx servers
Check your mime.types file or add:
types {
image/jpeg jpg jpeg jpe;
image/png png;
image/webp webp;
image/svg+xml svg;
}
Using browser developer tools
To check what MIME type your server is sending:
- Open browser DevTools (F12)
- Go to the Network tab
- Reload the page
- Click on an image file
- Look for "Content-Type" in the response headers
JPG vs JPEG MIME type: Summary
Let us recap the key points:
Practical examples: Using the correct MIME type
Example 1: HTML image tag
The MIME type is handled by the server, not the HTML:
<img src="photo.jpg"
alt="My photo"> <img src="photo.jpeg"
alt="My photo"> <!-- Same thing,
different extension -->
Both work exactly the same way. The server should send
Content-Type: image/jpeg for both.Example 2: File upload accept attribute
When allowing users to upload images:
<input type="file"
accept=".jpg,.jpeg,.png,.gif"> <!-- OR --> <input type="file"
accept="image/jpeg,image/png,image/gif"> <!-- OR using wildcard --> <input type="file" accept="image/*">
<!-- Accepts all image types -->
Example 3: Server-side code (PHP)
// Sending a JPEG file
header('Content-Type: image/jpeg');
readfile('photo.jpg');
// Check uploaded file MIME type
$finfo =
finfo_open(FILEINFO_MIME_TYPE);
$mime = finfo_file($finfo,
$_FILES['file']['tmp_name']);
if ($mime === 'image/jpeg') {
// It's a valid JPEG
}
What about other image formats?
Here are MIME types for other formats you might encounter:
- PNG:
image/png - GIF:
image/gif - WebP:
image/webp - AVIF:
image/avif - BMP:
image/bmp - ICO:
image/x-iconorimage/vnd.microsoft.icon - SVG:
image/svg+xml - HEIC:
image/heic(Apple's format)
Why this matters for image conversion
When you use an best free image converter online no signup, the tool needs to set the correct MIME type for your converted files. If you convert a PNG to JPG, the output file should be served with
This ensures that when you download and use the image on your website, browsers recognize it correctly.
image/jpeg. If you convert to WebP, it should be image/webp. This ensures that when you download and use the image on your website, browsers recognize it correctly.
Common questions about JPG and JPEG
Can I rename a .jpeg file to .jpg?
Yes, absolutely. The image data is identical. The file will open correctly in any software that supports JPEG.
Does the MIME type change if I rename the file?
No. The MIME type is determined by the server configuration or the file's content, not by the file extension alone. A properly configured server will send
image/jpeg for both .jpg and .jpeg files.Which extension should I use for my website?
Either one works. .jpg is more common because it was the standard on Windows. .jpeg is also perfectly valid. Choose one and be consistent.
Important note: Always use lowercase for MIME types.
image/jpegis correct.image/JPGorimage/JPEGmay not be recognized by all browsers.
JPEG advantages and why the format remains popular
Understanding JPEG's strengths helps explain why its MIME type is so important. For a complete overview, read about JPEG advantages and disadvantages.
Comparing JPEG with modern formats
Newer formats like WebP offer better compression. Learn more about is WebP better quality than JPEG.
And if you are working with PNG files, you might want to know the main drawback of the PNG file format.
And if you are working with PNG files, you might want to know the main drawback of the PNG file format.
The bottom line on JPG vs JPEG MIME type
JPG and JPEG are the same format. The correct MIME type for both is
When configuring your web server, writing code, or setting up file uploads, always use
Getting MIME types right ensures your images display correctly, your website works properly, and your users have a good experience.
image/jpeg. This never changes based on the file extension. When configuring your web server, writing code, or setting up file uploads, always use
image/jpeg for JPEG images. For PNG, use image/png. For GIF, use image/gif. And so on. Getting MIME types right ensures your images display correctly, your website works properly, and your users have a good experience.
Summary: JPG and JPEG are identical formats with different extensions. The correct MIME type for both is
image/jpeg. Always use lowercase, and configure your server correctly. For more help with image formats and conversion, visit Image Converter 24.