If the camera asks whether the card should be formatted, the computer cannot open the drive, or folders suddenly appear empty, the first goal is not to repair the card but to preserve its data with as little alteration as possible. Well-intentioned attempts such as file system repair, formatting, or taking more photos can overwrite areas that might still be recoverable. A safe approach therefore has three stages: stop writing to the card, create an image of the readable sectors, and perform recovery on a copy of that image.
First, isolate where the problem lies
Remove the card from the camera and do not use it again. You can move the locking tab on a full-size SD card to the write-protect position, but this tab is not an electronic security system; it is a mechanical request communicated to the reader. Do not assume that every reader will honor it.
Test the card in one reliable reader. If you are using a microSD-to-SD adapter, a read-only test with another adapter or reader can help rule out a faulty connection. If the card's capacity is shown correctly but the partition cannot be opened, the problem may be logical. If its capacity appears as zero or a meaningless value, the card repeatedly connects and disconnects, or it is not detected by different readers, the likelihood of a physical failure in the controller or NAND memory increases.
Do not repeatedly insert a card that is cracked, bent, burned, exposed to liquid, or has damaged contact surfaces. Disconnect power if the card becomes very hot. Memory and the controller are contained in the same small package, particularly on microSD cards, so attempting to solder or open the card at home can also make professional recovery more difficult.
Decline offers to format or repair the card
Choose the cancel option when the operating system warns that you need to format the drive before using it. Do not run CHKDSK, First Aid, or similar file system repair tools on the original card as your first response. These tools may modify metadata to create an accessible file system, whereas data recovery requires the least altered source possible.
Quick formatting is not risk-free either. According to the SD Association, quick formatting reinitializes file and directory entries, while overwrite formatting writes to the entire user data area. Do not choose any type of formatting until recovery is complete. Source: https://www.sdcard.org/downloads/formatter/faq/
Prepare the right destination for the raw image
Set aside more free space than the card's nominal capacity on a healthy internal or external drive. For example, a 128 GB card requires at least 128 GB for the image, plus additional space for recovered files and working copies. The destination drive must not be the SD card itself.
If the card can be read without errors, you can use a read-only disk-imaging tool to create a sector-by-sector copy. If there are read errors, freezes, or severe slowdowns, an ordinary copying program may repeatedly read the same damaged area without proper control. GNU ddrescue is designed to copy the readable portions first and address damaged areas later. Its mapfile records which blocks have been processed, allowing an interrupted operation to resume without starting over. The official manual specifically recommends using a mapfile: https://www.gnu.org/software/ddrescue/manual/ddrescue_manual.html
If you have no command-line experience, do not run ddrescue by guessing device names. Reversing the source and destination can erase healthy data. Check the capacity, manufacturer, and connection type in Disk Management or Disk Utility. If you are unsure, seek expert assistance during the imaging stage. The image and mapfile must both be stored on the healthy destination drive.
Applying endless retries to a failing card is not a good strategy either. Every read attempt may place additional strain on unstable hardware. It is generally more valuable to collect the easily readable areas during the first pass and make a limited number of controlled retries later. The official documentation explains ddrescue's recovery status, how unreadable areas may be represented by zeros, and how the mapfile works in detail.
Perform recovery on a copy of the image
After creating the raw image, remove the original card and store it somewhere safe. If possible, create a working copy of the image file. If you intend to try file system repair, do so only on this copy. This allows you to return to the primary image after an unsuccessful operation.
If the file system structure remains partially intact, recovery tools capable of reading partition and directory structures may preserve the original names. If the structure is severely damaged, file-signature-based tools such as PhotoRec can extract JPEG, RAW, and video content from the damaged file system. The tradeoff is that the original folders and filenames are usually lost. The PhotoRec documentation states this limitation explicitly: https://www.cgsecurity.org/testdisk_doc/photorec.html
Select an output folder for the recovery tool on the healthy drive containing the image or on another sound storage device. Do not write the output to the SD card or overwrite the image being scanned. Selecting only the file types you need can simplify the scan and subsequent sorting. However, make sure you do not exclude your camera's RAW extension, JPEG files, videos, or any accompanying sidecar files.
Verify the recovered files
A file being listed does not mean it is intact. Open photos at full resolution; do not rely solely on a small preview. Blocks of color or missing areas near the bottom of an image may indicate that part of the file could not be read. Play videos from beginning to end or from several points in the timeline. Try opening RAW files in the editor you normally use.
PhotoRec may reuse the date when the metadata in the file header is suitable. The official documentation says this information should not be considered forensically accurate because of possible time-zone or device-clock errors. Group recovered files by extension, capture date, EXIF camera information, and visual similarity. Be careful not to mistake small embedded previews of the same frame for the original photo.
Copy verified photos to at least two separate storage locations. One may be an external drive that normally remains disconnected from the computer; the other may be a reliable cloud service or a backup at a different physical location. Merely renaming the recovery folder does not create a backup.
When should you use a professional laboratory?
Stop attempting software recovery at home if the card is not detected at all, its reported capacity keeps changing, it becomes excessively hot, or its connection frequently drops. If the contents are the only copies of wedding, birth, research, or commercial photographs, remember that the first attempt may be the most valuable one. Ask the laboratory for written information about pricing before work begins, any fee charged if recovery fails, its privacy procedures, and the return of the original card.
After recovery is complete, do not reuse a card that has shown signs of failure for critical shoots. Even if the card can be formatted and passes a test, its reliability has not been established. Buy a new card from a reputable seller, verify its actual capacity with a complete write-read test, and regularly transfer your photographs to a second storage medium. The strongest recovery strategy is to ensure that the only copy is never left solely on a memory card.