If you're running Windows 7 and suddenly can't open JPG files, you're not alone. This is a common issue that can stem from several causes—corrupted file associations, missing or outdated photo viewers, or even malware interference. The good news is that most of these problems are fixable without needing to reinstall your entire operating system. Let's walk through the most effective troubleshooting steps to get your JPG files opening again.
Why Can't I Open JPG Files on Windows 7?
JPG (or JPEG) is one of the most widely used image formats, and Windows 7 comes with a built-in photo viewer—Windows Photo Viewer—that should handle these files by default. When it stops working, it's usually because the file association has been changed, the default program is missing or corrupted, or another application has taken over as the default handler for JPG files.
Another possibility is that the JPG file itself is corrupted. If only one specific file won't open, the issue might be with that particular file rather than your system settings. But if all JPG files refuse to open, the problem is almost certainly related to your default program settings or system configuration.

How to Fix JPG File Association in Windows 7
The most common fix involves resetting the default program for JPG files. Here's how to do it step by step:
- Click the Start button and go to Default Programs.
- Select Associate a file type or protocol with a specific program.
- Scroll down the list until you find .jpg (and also check .jpeg).
- Click on it, then click Change program....
- Choose Windows Photo Viewer from the list. If it's not visible, click Browse and navigate to
C:\Windows\System32\rundll32.exewith the appropriate parameters, or select another image viewer you have installed.
This method directly tells Windows which program should handle JPG files, overriding any incorrect associations that may have been set by third-party software.
Re-enable Windows Photo Viewer
In some cases, Windows Photo Viewer might appear to be missing entirely. While it's still present in Windows 7, certain updates or software installations can hide or disable it. You can verify it's available by right-clicking a JPG file, selecting Open with, and then Choose default program. If Windows Photo Viewer isn't listed, you may need to re-enable it through the registry or use a system restore point from before the issue started.

Alternatively, you can install a free third-party image viewer like IrfanView or XnView. These lightweight programs handle JPG files reliably and often provide more features than the default Windows Photo Viewer.
Check for Malware and Corrupted System Files
Malware can sometimes change file associations or corrupt system components responsible for opening image files. Run a full system scan using Windows Defender or a trusted antivirus program. After that, open Command Prompt as an administrator and run the following command:
sfc /scannow |
This command scans and repairs corrupted system files, which can resolve issues with built-in programs like Windows Photo Viewer. The scan may take several minutes, so be patient and let it complete before restarting your computer.
When the JPG File Itself Is the Problem
If only certain JPG files won't open, the files may be corrupted. Try opening them on another computer or device. You can also use online JPG repair tools or image recovery software to attempt to salvage the file. If the file was downloaded from the internet, try re-downloading it—interrupted downloads are a frequent cause of corrupted image files.
Preventing future issues is straightforward: keep your system updated, avoid forcefully shutting down your computer while files are being written, and regularly back up important images to an external drive or cloud storage.