# How to recover deleted photos from an SD card

> Deleted photos or a formatted card can often still be saved, as long as you stop using the card right away. How to do it with PhotoRec, a free and open-source program for Windows, Mac and Linux, without making things worse.

Source: https://simplebuild.it/tutorial/recuperare-foto-cancellate-sd
Author: SimpleBuild, Build simple. Deliver value.
Category: Backup and security
Procedure verified on: 2026-09-29

Very often, yes, photos can be recovered: when you delete or format, almost all cameras don't really erase the data, they just mark the space as free. The most important thing is to **stop using the card right away**: no new photos, no copying anything onto it. Then you can try **PhotoRec**, a free and open-source program that searches for photos directly in the card's data.

## Before you start: the golden rule

**From now on, don't write anything to the card.** The PhotoRec developers say so clearly too: as soon as you find out you've lost data, don't save anything else to that device, because new data can overwrite the old data forever.

In practice:

1. **Turn off the camera** and take out the card. Don't take any more photos, not even a "test" one.
2. **Don't format** the card and don't run any repairs. If the computer offers to format it, say no.
3. **Don't copy anything onto it.**

What you need:

- A **computer** with Windows, Mac or Linux.
- A **card reader**: the one built into the computer or an external USB one.
- **Free space** on another drive, at least as big as the card, where you'll save the photos you find. **Never on the card itself.**
- A little patience: the search can take a long time on large cards.

## Download PhotoRec from the official website

PhotoRec is distributed under the GNU GPL license, meaning it's free and open source, together with the TestDisk program. Download it **only from the official website**, [cgsecurity.org](https://www.cgsecurity.org/wiki/TestDisk_Download): the current stable version is 7.2 and there are packages for Windows, macOS and Linux.

You don't need to install it. It's a "portable" program: you unzip the archive and use it right away. On Windows, extract **all** the files from the archive, subfolders included, before starting it.

## Recover photos on Windows

The Windows archive contains two versions: **qphotorec_win** has windows and buttons, **photorec_win** works with the keyboard in a text window. The steps below are for the keyboard version, as described in PhotoRec's official guide.

1. Insert the card into the reader.
2. Double-click **photorec_win.exe** (or **qphotorec_win.exe**). You need an administrator account: Windows will ask you to confirm, answer yes.
3. **Choose the disk**: in the list, use the arrow keys to select the memory card and press **Enter**. Recognize it by its size: don't choose the computer's drive.
4. **Choose the partition** on the card and select **Search** to start. With **File Opt** you can choose which file types to look for: you can usually leave everything as it is.
5. **File system type**: choose **Other**. The other option is only for Linux disks.
6. **Where to search**: choose **Free** if you only deleted the photos (it searches the free space); choose **Whole** if the card was formatted or gives errors (it searches the whole card).

   ![PhotoRec screen, in English like the program: the choice between Free, to search the free space, and Whole, to search the whole card.](https://simplebuild.it/assets/img/tutorial/recuperare-foto-cancellate-sd-free-667.webp) (Image: [CGSecurity, the makers of PhotoRec](https://www.cgsecurity.org/wiki/PhotoRec_Step_By_Step))

7. **Where to save**: use the arrow keys to move to a folder on the computer's drive or on an external drive. To see the list of drives (C:, D:…), select `..` and press **Enter**, several times if needed. When you're in the right folder, confirm with **Y**.
8. Wait. The number of files found grows in real time.

The photos found go into folders called **recup_dir.1**, **recup_dir.2** and so on. You can open them even while the search is still running. If you stop, next time PhotoRec asks whether you want to resume where you left off.

## Recover photos on Mac

On Mac, PhotoRec runs in Terminal, with the same steps as the Windows version described above.

1. Unzip the macOS archive downloaded from the official website.
2. Start PhotoRec: if you don't have administrator rights, the program asks you to confirm and then asks for your Mac password. While you type it, nothing appears in Terminal: that's normal.
3. If no disk appears in the list, give Terminal full disk access: **System Settings > Privacy & Security > Full Disk Access**, then add Terminal with the **+** button.
4. Follow steps 3 to 8 of the Windows section. On a Mac, external drives are usually in the `/Volumes` folder.

## After the recovery

- **Check the photos** one by one: some may be damaged or incomplete.
- **Run an antivirus scan** on the recovered files before opening them all, as the PhotoRec documentation recommends: the program recovers any file, infected ones included.
- **Put them somewhere safe** right away, with at least two copies in different places. I explain how in [the 3-2-1 backup rule](https://simplebuild.it/tutorial/regola-backup-3-2-1).
- **Only after that**, if you want to reuse the card, format it in the camera. If it has already given you errors, consider replacing it.
- There may be lots of recovered photos with numbered names. To put them in order with sensible names, the guide on [how to rename many files at once](https://simplebuild.it/tutorial/rinominare-piu-file-insieme) can help.

## If it still doesn't work

- **The card doesn't appear in the list**: try another reader or another USB port. On a Mac, check the full disk access permission.
- **On Windows, the card is protected with BitLocker**: unlock it before starting PhotoRec.
- **PhotoRec finds very few files**: try again choosing **Whole** instead of **Free**.
- **Don't save to a FAT32 drive** if you're recovering videos: that format can't handle files larger than 4 GB.
- **The photos were on your phone, not on a card**: first of all, look in the recently deleted album of your Photos app or your cloud service.
- If the card is **physically damaged**, bent, wet, or isn't read by any computer, stop: every attempt can make things worse. In these cases, and when the photos are irreplaceable, it's best to ask a technician before trying anything else.

## Frequently asked questions

### Why do the recovered photos have strange names?

PhotoRec finds the content of the files but not their original names. Photos come back with numbered names inside "recup_dir" folders: sort them by date or look at the thumbnails to find the ones you want.

### Does it work if I formatted the card?

Often, yes. PhotoRec doesn't rely on the card's list of files but searches the data directly, so it also works on reformatted or damaged cards. But nobody can guarantee it if you've written to the card in the meantime.

### The recovered videos won't open: why?

Some cameras record videos in pieces scattered across the card, and recovery programs expect whole files. The PhotoRec documentation describes a special option for these cases; if you don't feel up to it, get help.

### Can I save the recovered photos to the same card?

No, never. Writing to the card can overwrite the very photos you're trying to save. Save them to your computer's drive or to an external drive.

## Sources

- [PhotoRec, official page (CGSecurity)](https://www.cgsecurity.org/wiki/PhotoRec)
- [PhotoRec step by step (CGSecurity)](https://www.cgsecurity.org/wiki/PhotoRec_Step_By_Step)
- [Recovering deleted files using PhotoRec, 7.2 documentation (CGSecurity)](https://www.cgsecurity.org/testdisk_doc/photorec.html)
- [Starting the tools, on Windows and macOS (CGSecurity)](https://www.cgsecurity.org/testdisk_doc/running.html)
- [TestDisk and PhotoRec download (CGSecurity)](https://www.cgsecurity.org/wiki/TestDisk_Download)
- [Recovering lost videos from a memory card (CGSecurity)](https://www.cgsecurity.org/testdisk_doc/photorec_video.html)
- [Change Privacy & Security settings on Mac (Apple)](https://support.apple.com/guide/mac-help/mchl211c911f/mac)
