Table of Content
    Photo Repair

    How to Repair Corrupted JPG Files From Digital Camera?


    Table of Content

      Summary: Your JPG files can become corrupted for various reasons, such as a digital camera error, a corrupt or damaged SD card, or clicking photos with a low battery. To repair corrupt JPG files, use Hex Editor, the CHKDSK command, or a professional photo repair software.

      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:

      1. Get professional Stellar Repair for Photo (Recommended)
      2. Use Hex Editor
      3. 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.

      JPEG REpairJPEG Repair Mac Sierra

      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.
      1 stellar repair for photo main screen
      • 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.
      2 add corrup jpg files
      • Once you finish adding corrupted JPG image files, click the ‘Repair’ button to start the repair process.
      3 click repair
      • Once the repair process is completed, you can see the prompt saying, ‘Repair process completed.’ Click OK.
      4 stellar repair for photo process completes
      • Next, select the images you want to Preview to see how repaired image files look.
      5 preview repaired files
      • 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.
      healthy JPEG file hex editor
      Figure 1: Healthy JPG File
      • Copy the correct header from a healthy JPG file and paste it into the corrupted JPG header. Do not overwrite the actual image data.
      corrupt JPEG file hex editor
      Figure 2.Corrupted JPEF File
      • 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.
      run chkdsk command

      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.

      Change the Image Format

      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.
      change image format

      Tips to Prevent JPEG Images from Being Corrupted

      1. Stop shooting when your SD card is full.
      2. Stop using the camera’s SD card if you encounter any errors.
      3. Don’t use the same SD card on multiple cameras or devices.
      4. Don’t remove the SD card when the camera is on.
      5. Always format the card before each shoot.
      6. Avoid shooting when the device’s battery is low.
      7. Properly transfer images from the camera to other devices.
      8. Avoid changing the format or headers of JPEG files manually.
      9. Only use trustworthy photo viewing or editing applications to open JPEG images.
      10. 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.

      Free Download for Windows 
Free Download for Mac
      If your RAW files don't open in any image viewer application, are blurred, or have an unusual color, you can say your RAW image files are corrupted.
      You can repair a damaged JPEG header using the Hex Editor tool or Stellar Repair for Photo.
      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?

      No NO

      About The Author

      Vishakha Singh linkdin

      Vishakha Singh is a Senior Writer at Stellar Data Recovery with half a decade of experience in writing content in diverse verticals. She's a tech enthusiast who loves creating photo/video recovery & repair tutorials. Vishakha also specializes in writing full-blown iPhone and Android guides.

      4 comments

        1. Hi Gilroy,
          Yes. Windows has its built-in repair tool that works to repair corrupted images. sfc/scan, chkdsk and Paint. Please go through the blog and you will find your answers.

      1. Can I check for the corruption of my images, since I am able to open those images on my phone but showing error on my PC.

        1. Hi Yann,
          It’s important to note that a file marked as corrupted may not always be truly damaged. Sometimes, glitches or bugs can make this happen. You can repair them by opening and saving the file using a program like Paint or using the photo repair software.

      Leave a comment

      Your email address will not be published. Required fields are marked *

      Image Captcha
      Refresh Image Captcha

      Enter Captcha Here :

      Related Posts

      WHY STELLAR® IS GLOBAL LEADER

      Why Choose Stellar?

      • 0M+

        Customers

      • 0+

        Years of Excellence

      • 0+

        R&D Engineers

      • 0+

        Countries

      • 0+

        PARTNERS

      • 0+

        Awards Received