How to Fix a Bad or Lost Header in JPEG Files

By Jason Candanedo

You have various options to repair a bad header in a JPEG picture file.
i Creative Crop/Digital Vision/Getty Images

The JPEG file format is a very popular format for images. JPEG is compatible with many programs and devices that use digital media, such as digital cameras. JPEG files, like any other file, are prone to becoming damaged and corrupted because of reasons such as a faulty memory and hard drive errors. In this case, you must repair the file header to restore the picture file. You can use various options to accomplish this task.


Go to the IrfanView website and download the software. Locate the downloaded file, double-click it and follow the instructions to download onto your computer. InfranView can decode a JPEG file when it is corrupted.

Double-click the IrfanView desktop icon to run the program. Click "File" and select "Open." Locate the corrupted JPEG file and double-click it. If it displays correctly, click "File" and click "Save as." This will save a new copy of the JPEG file. Select "JPG -- JPG/JPEG Format" in the "Save as type" in the the "Save Picture As" drop-down box. Select a different file name for the JPEG.

Close the IrfanView program after the JPEG file is fixed.

Image Recovery Software

Download and install an image recovery program onto your computer. Example of these programs are PhotoRescue, JPEG Recovery Pro, or PixRecovery. Most of these programs are not free. You can download the demo versions, but most do not fully repair the JPEG until purchase.

Run the image recovery program and browse for the corrupted JPEG file.

Select the corrupted JPEG in the program's file browser and click the fix or repair button.

Data Recovery Service

After exhausting your options, contact a professional data recovery service. Some examples of data recovery companies are Ontrack Data Recovery, Total Recall Data Recovery and ACE Data Group. Ontrack Data Recovery offers a digital photo recovery service for "lost, deleted, damaged and inaccessible photos," on hard drives or memory cards, for example.

Get quotes from the data recovery services and compare costs. Usually, professional data recovery companies are the most expensive option, especially in contrast to computer programs. If you decide to go down this route, you must send the memory card or hard drive to the company via mail services.

Ensure that you are familiar with the company's policies before you commit to the service. You might still get charged for some services even if the JPEG cannot be fixed.