JPG or JPEG is a popular file format among photographers or graphic designers because it stores high-quality images in smaller files, making it easy to share and upload online. These files use a lossy compression method to reduce the image’s file size and occupy less space on the camera SD card or any other storage device.
JPEG photos captured from any popular digital camera, such as Canon, Nikon, Sony, etc., can be easily viewed in any photo viewing software on your computer or smartphone.
However, like any other image format, JPEG files captured from digital cameras can also get corrupted for various reasons. Users often report that they cannot open or view the JPEG image in any image viewer application.
Now, the question arises: How can corrupted JPEG files be repaired?
Here, we have shared the best methods to fix corrupt JPG/ JPEG files. Before that, let’s understand why your JPG images get corrupted.
Why do your JPG photos get corrupted?
JPEG photos shot with a digital camera are saved either on the camera SD card or built-in digital camera memory. A system disconnect might occur during the transfer of these JPEG files from the camera to the computer or another device, leading to corruption in JPEG or JPG photos. Moreover, your JPG files can get corrupted due to various Digital camera errors, such as camera shutter or battery errors.
Some common reasons for corruption in JPEG pictures shot from digital cameras are:
- Clicking photographs when the digital camera battery is low
- Sudden system shutdown during JPEG file transfer/ download or copy
- Improper insertion or removal of SD card from the digital camera or system
- SD card is physically damaged
- The SD card carrying JPG files is corrupted
- Virus or malware infection
- Using the same camera SD card on multiple devices
- Digital camera error
How to Repair Corrupted JPEG Files?
Corruption in JPEG can be of two types: Corrupted JPG image data or header. If the image data of a JPEG file is corrupt, the image will appear blurry or distorted. However, if the header of the JPG file is corrupt, you cannot preview or view the image.
You can fix the corrupted JPG image file by using various methods that include:
- Get professional Stellar Repair for Photo (Recommended)
- Use Hex Editor
- Use CHKDSK command
We recommend using a professional tool like Stellar Repair for Photo, a secure and safe way to fix corrupt JPEG files without affecting the original image quality.
Method 1: Repair corrupt JPEG file with Stellar Repair for Photo
Stellar Repair for Photos is the best tool for repairing corrupt or damaged JPEG files. This advanced tool is designed to fix corruption in the image file header and data, invalid image file structure, unknown or invalid markers, etc.
Stellar Repair for Photo will automatically recommend ‘Advance Repair’ if your JPEG photos are severely damaged. The Advance Repair feature uses a sample file in JPEG format captured from the same camera as your corrupt picture.
The software can repair JPEG/ JPG photos captured from various cameras, including DSLRs, SLRs, camcorders, etc., from Nikon, Panasonic, Fuji, Sony, Canon, Olympus, Kodak, and others. It can also repair TIFF, HEIC, DNG, and RAW image formats from Sony, Nikon, Olympus, Kodak, Fuji, etc.
Key benefits of using Stellar Repair for Photo software to fix corrupted JPEG pictures:
- It can repair multiple photos of the same or different file formats simultaneously.
- Use sample files to repair severely corrupt image files.
- Provides thumbnails for images that are severely corrupt beyond repair.
- It allows you to preview the repaired images before saving them.
Download the free Stellar Repair for Photo trial to assess its photo repair capability. In this trial, you can even preview repaired corrupt photos.
Steps to repair JPG files using Stellar Repair for Photo:
- Download and install the Stellar Repair for Photo software on your Windows and Mac. Once installed, launch the software.
- Click on the ‘Add File’ icon to insert corrupted JPG files. Select single or multiple images and click Open to add photos to the software for repair.
- Once you finish adding corrupted JPG image files, click the ‘Repair’ button to start the repair process.
- Once the repair process is completed, you can see the prompt saying, ‘Repair process completed.’ Click OK.
- Next, select the images you want to Preview to see how repaired image files look.
- Once satisfied with the repair result, click Save Repaired Files and browse the location to save the repaired images at a desired destination.
Method 2: Repair corrupted JPG files using Hex Editor
Hex editors are file editing tools that let you change an image file’s hexadecimal or binary data. You can use it to fix the broken JPEG/ JPG file header by comparing the damaged one with the correct one.
Common hex editors are OxED, HexEd.it, Hex Workshop, Hex Fiend, and others. They are available for both Mac and Windows.
Steps to fix JPG files using Hex Editor:
- Open the corrupted JPEG file in a hex editor, say, for example, HxD
- Next, compare the header of the corrupted JPG with that of any healthy JPG file. In healthy JPG files, the JPEG header always starts with FF D8, and the JPEG data always starts with FF DA and ends with FF D9.
- Copy the correct header from a healthy JPG file and paste it into the corrupted JPG header. Do not overwrite the actual image data.
- Once done, save the file and try to open the file again.
However, we recommend using the hex editing tool only if you know the hexadecimal format. Otherwise, you may damage your photos more.
Method 3: Use CHKDSK Command
Bad sectors on the hard drive can often make your image file inaccessible; try running the CHKDSK command. It can help in fixing the bad sectors; follow the below steps to know how to do it:
- Press the Windows + R keys together to open the Run window.
- Type cmd.exe and click Enter to open Command Prompt.
- Type chkdsk (drive letter): /r in the command window.
- The process will take time to check for errors and repair them.
After completing the scan, restart your system and check if the JPEG files are opening.
Also read: Improve JPEG Quality: 4 Ways to Increase JPEG Resolution
Workarounds to Repair Corrupt JPEG Files
Although Stellar Repair for Photo can easily fix the corruption in JPG files, there is no harm in using manual methods to resolve this. Following are some workarounds you can try to repair corrupt JPG files:
Make Sure Your Photo Viewer App is Up-to-Date
If you can’t open JPG files in Windows Photo Viewer, Adobe Photoshop, or another image-viewing app, ensure the program is updated for opening JPG files. If not, update the photo viewer app first and then try opening the file again.
Open JPG Files in another Image Viewer Software
If the JPG files do not open in your existing photo viewer software, try opening them in another software like Picasa Photo Viewer, Windows Live Photo Gallery, Google Photos library, Adobe Lightroom, or Adobe Photoshop.
If you cannot open the JPG file in Windows Photo Viewer or any other photo viewing application, try converting the file format to a different one. To do so, follow the given steps:
- Open the image in Paint or another photo editing software.
- Click File, and to change the file extension, click Save As.
- Select any image file format, such as .bmp or .png, from the drop-down menu next to Save as type, and click Save to store it at any desired location.
Tips to Prevent JPEG Images from Being Corrupted
- Stop shooting when your SD card is full.
- Stop using the camera’s SD card if you encounter any errors.
- Don’t use the same SD card on multiple cameras or devices.
- Don’t remove the SD card when the camera is on.
- Always format the card before each shoot.
- Avoid shooting when the device’s battery is low.
- Properly transfer images from the camera to other devices.
- Avoid changing the format or headers of JPEG files manually.
- Only use trustworthy photo viewing or editing applications to open JPEG images.
- Maintain regular backup of your SD card to prevent data loss.
To Sum Up
This blog explains why JPEG files captured from digital cameras become corrupted and ways to fix them. You can easily fix corrupt JPG files with the help of advanced photo repair software – Stellar Repair for Photo. Its efficient algorithms fix corrupt or broken file headers and data, leading to unreadable, inaccessible, or damaged photos. Unlike the hex editing tool, the software is fast, simple, and doesn’t require any technical know-how.
You can repair JPEG photos from all digital cameras, including Fuji, Sony, Canon, and Nikon.
It’s recommended to first try the trial version to be assured of the software’s performance. It shows a preview of your repaired JPEG/ JPG photos.
Why my photos don’t open in Windows?
There can be many reasons why your photos won't open in Windows, such as an outdated or corrupted photo viewer app, virus or malware, incompatible file format, or image corruption.
Was this article helpful?