How to Fix Corrupted SD Card: 5 Methods That Work (2026)

Knowing how to fix a corrupted SD card can be the difference between recovering irreplaceable photos and losing them permanently — yet most people waste critical time trying the wrong method first. Your card might show a “You need to format the disk before you can use it” error, appear completely blank, or refuse to be recognized at all. Before you assume it’s dead and throw it away, stop. The data is very likely still there. SD card corruption, in the majority of cases, is a file system problem — not a hardware failure — and that means it’s fixable with the right tools in the right order.

This guide walks you through every proven method, from the fastest one-command Windows fix to cross-platform recovery tools, and tells you exactly when each approach applies. More importantly, it steers you away from the single mistake that causes permanent data loss: running repair tools before recovering your files.

how to fix corrupted sd card

What SD Card Corruption Actually Means: Logical vs. Physical

Think of your SD card’s file system like a library index. The index tells you which shelf holds which book — without it, the books are still there, but you can’t find them. Corruption means the index is scrambled or missing, not that the books themselves are gone. That distinction is everything.

Logical corruption is a software-level problem: the file system metadata — the index — has become inconsistent due to a crash, improper ejection, or power interruption during a write. The underlying data on the flash memory chips is physically intact; the card’s controller just can’t navigate to it. According to Microsoft’s official CHKDSK documentation, logical errors result from prior software malfunctions or irregular use, such as hard resets, and are usually repairable with software tools.

Physical corruption is different. Here, the NAND flash memory chips themselves are degraded or damaged — worn out from too many write cycles, exposed to static electricity, or mechanically broken. Community troubleshooting data from the Raspberry Pi Stack Exchange notes that failing SD cards may enter a read-only mode as a final protective measure; once that happens, the hardware is in a terminal state. Software tools cannot fix physical damage.

The practical rule: if your computer or camera can still detect the card but throws errors, you’re almost certainly dealing with logical corruption. If the card is completely undetected across multiple devices and multiple card readers, physical failure is the more likely cause — and you should skip directly to professional recovery services.

Common Causes of SD Card Corruption

Understanding the cause helps you prevent recurrence and, sometimes, choose the right fix. These are the six most documented causes:

  • Improper ejection during a write operation. Yanking a card out while data is being written to it is the single most common cause of file system corruption. The write operation leaves the file allocation table in an incomplete state.
  • Power interruption during a write. A sudden power cut — dead camera battery, device crash — while data is being saved causes the same incomplete-write problem. As cleverfiles.com notes, repeated occurrences make corruption “virtually inevitable.”
  • Virus or malware infection. A virus can corrupt the file system directly, often producing the Windows error “The file or directory is corrupted and unreadable” (error code 0x80070570).
  • File transfer interruption. Cancelling a transfer mid-stream — especially on slower USB 2.0 readers — leaves orphaned data blocks that confuse the file system on the next mount.
  • Using a microSD card with an adapter in a full-sized SD slot. SanDisk’s official support documentation explicitly states: “Do not use a microSD card and adapter in a full-sized SD card slot.” The mechanical fit is imprecise enough to cause read/write errors that damage the file system over time.
  • NAND flash degradation and counterfeit cards. All flash memory has a finite write cycle lifespan. Budget or counterfeit cards use lower-quality flash chips that fail faster and often advertise fake storage capacities, making corruption far more likely under normal use.

How to Diagnose Your Corruption Type Before Fixing

Running the wrong repair method can overwrite recoverable data. Spend two minutes diagnosing first.

Step 1 — Test on multiple devices. Insert the SD card into at least two different devices (e.g., your laptop card reader and a camera). Use a different USB card reader if you have one. If the card is detected by any device, logical corruption is the likely culprit. If it’s invisible on all devices, physical failure is probable.

Step 2 — Note the exact error message. “You need to format the disk in drive X: before you can use it” usually indicates file system corruption. A card showing as RAW with 0 bytes used and 0 bytes free means the partition table itself is damaged — and this matters because CHKDSK cannot run on RAW drives. “File or directory is corrupted and unreadable” (error 0x80070570) points to file-level logical corruption. Sudden write-protection with the physical switch in the correct unlocked position signals controller or file system failure.

Step 3 — Confirm the file system the card should be using. According to the SD Association’s official capacity standards, SD cards use FAT12/16 (up to 2 GB), SDHC cards use FAT32 (2 GB–32 GB), SDXC cards use exFAT (32 GB–2 TB), and SDUC cards use exFAT (2 TB–128 TB). If your card shows an incorrect or absent file system in Disk Management or Disk Utility, that confirms file system-level corruption.

So which type of corruption do you actually have? If the card is detected and shows a file system (even a damaged one), proceed to the fix methods below in order. If it’s showing RAW or is undetected, jump to data recovery options first — and then reformat.

how to fix corrupted sd card

How to Fix a Corrupted SD Card: Step-by-Step Methods (Ordered by Risk)

Work through these in sequence. Each method is progressively more aggressive. Do not skip to formatting until you’ve exhausted the repair options — or until you’ve already recovered your data.

Method 1: Run CHKDSK on Windows (Lowest Risk, Fastest)

CHKDSK (Check Disk) is Windows’ built-in file system repair tool. It verifies file system integrity and fixes logical errors without intentionally wiping your data — though it may delete severely corrupted fragments. This is your first move for any card that Windows can detect.

  1. Insert the SD card into your computer and note the drive letter assigned (e.g., G:).
  2. Type cmd in the Windows search bar, right-click Command Prompt, and select Run as administrator. Administrator privileges are required — CHKDSK will fail without them.
  3. Type the following command, replacing G with your card’s drive letter: chkdsk /f /r /x G:
  4. Press Enter and wait. Don’t worry about memorizing the exact letters — think of this as one grouped instruction that tells Windows to do three things at once: (A) find and fix errors in the index, (B) scan for physically damaged spots and rescue any readable data from them, and (C) safely detach the card from Windows before it starts making any changes. You’re not casting a spell — you’re just handing Windows a checklist.
  5. After the scan completes, check your SD card. If CHKDSK found and moved corrupted file fragments, look for a hidden found.000 folder in the card’s root directory. CHKDSK places recoverable file fragments there, renamed as .chk files (e.g., file00000000.chk). Those files may be partially or fully recoverable with a hex editor or file recovery tool.

Two important caveats. First, CHKDSK cannot run on RAW drives — if your card shows as RAW, skip this step entirely and go to Method 5. Second, on FAT-formatted cards (which includes most SD and SDHC cards), CHKDSK may prompt you to convert the file system to NTFS. Do not do this. NTFS is not part of the SD Association’s file system standards and is not supported by most cameras, Android devices, or media players.

Method 2: Use Mac Disk Utility First Aid (macOS, GUI-Based)

Mac Disk Utility’s First Aid function performs the same logical repair function as CHKDSK, but through a graphical interface. It runs a read-only verification pass before writing any repairs, making it slightly lower risk for a first attempt.

  1. Insert the SD card (via a card reader if your Mac lacks a built-in slot).
  2. Open Finder → Applications → Utilities → Disk Utility.
  3. Select your SD card from the left sidebar (select the volume, not the parent device, for a targeted repair).
  4. Click First Aid → click Run.
  5. Wait for the process to complete. Disk Utility will report whether it found and fixed errors.

If First Aid reports “The volume could not be repaired,” proceed to Method 3.

Method 3: Run fsck in Terminal (Mac and Linux, Deeper Repair)

When Disk Utility First Aid fails, the command-line fsck (File System Consistency Check) is the next step. It’s the functional equivalent of CHKDSK for Unix-based systems and can repair file system damage that the GUI tool cannot.

  • FAT12/16 or FAT32: sudo fsck_msdos -f /dev/disk2s1
  • exFAT: sudo fsck_exfat -d /dev/disk2s1
  • Linux ext4: sudo fsck -p /dev/sdb1

Review the output. If prompted to repair, confirm with y.

Method 4: Use the SD Association’s Official Formatter (Windows, macOS, Linux)

When repair tools can’t fix the file system, reformatting is the next step — but use the right formatter. The SD Memory Card Formatter from the SD Association is the official tool, available free for Windows, macOS, and now Linux (x86_64 and ARM64). The SD Association strongly recommends this over OS-native formatting tools because it preserves the SD card’s internal wear-leveling alignment and cluster size — formatting with Windows’ built-in tool can degrade performance and shorten the card’s lifespan.

The tool offers two modes: Quick Format (reinitializes file system parameters only) and Overwrite Format (zeroes the entire user data area — takes longer but is more thorough for persistent corruption issues). Choose Overwrite Format if Quick Format doesn’t resolve the problem.

Critical reminder: formatting wipes all data. Only proceed with this method after completing data recovery first.

Method 5: Full Reformat via OS Tools (Last Resort)

If the SD Association Formatter fails or the card is showing as RAW and unformatted, a full reformat via Disk Management (Windows) or Disk Utility (Mac) is the final software-level option. On Windows, open Disk Management (right-click Start → Disk Management), right-click the SD card volume, select Format, choose FAT32 for cards up to 32 GB or exFAT for larger cards, and run the format. On Linux, sudo mkfs.vfat /dev/sdb1 for FAT32 or sudo mkfs.exfat /dev/sdb1 for exFAT achieves the same result.

If the card still doesn’t function correctly after a full reformat, the problem is hardware. Replace the card.

Data Recovery Options: Do This Before Any Repair

The rule across every authoritative source — SanDisk’s community forums, DiskGenius documentation, and troubleshooting threads — is consistent: stop using the card the moment corruption is detected, and recover data before running any repair tool. Even a quick format doesn’t immediately destroy data; it removes the reference to the files but leaves the underlying data intact until overwritten. That recovery window is narrow and shrinks with every write operation.

Here are the most reliable tools, ordered from free to paid:

  • PhotoRec (free, Windows/Mac/Linux): Open-source, command-line, and highly effective. It ignores the file system entirely and scans for file signatures directly on the raw storage blocks — meaning it works even when the partition table is destroyed. A strong first-line recovery tool according to community troubleshooting data from Quora and Stack Exchange threads.
  • TestDisk (free, Windows/Mac/Linux): Often packaged with PhotoRec. Where PhotoRec recovers files by content, TestDisk repairs damaged partition tables and boot sectors, which can restore an entire file system structure without touching individual files.
  • Disk Drill (freemium, Windows/Mac): Recovers 400+ file types with a GUI interface. The free version recovers up to 500 MB of data and supports NTFS, FAT32, exFAT, HFS+, and EXT file systems. Users who need to recover more than that will need the paid version. Reviewers commonly note that Disk Drill’s scan preview accurately shows file names and thumbnails before committing to recovery.
  • Stellar Photo Recovery / Stellar Data Recovery Professional (paid): Referenced in SanDisk’s official community forums. Offers a free trial that lets you scan and preview recoverable files before purchasing a license to save them.
  • ddrescue (free, Linux/Mac): Not a file recovery tool per se — it clones partially failing media to a disk image, sector by sector, prioritizing readable sectors first. Use this when the card is mechanically struggling or intermittently recognized. Clone first, recover from the image.

SanDisk’s official support documentation frames the recovery sequence clearly: move files from the card using a computer first, then address the card’s file system afterward. That sequence — extract, then repair — protects your data through every subsequent step.

Comparison Table: Which Fix Method to Use and When

MethodOS CompatibilityData Preservation RiskDifficultyBest For
CHKDSK /f /r /xWindows onlyMedium — may delete severely corrupted fragments; creates found.000 folder with fragmentsLow (command line)Logical file system errors on FAT32/exFAT cards still detected by Windows
Mac Disk Utility First AidmacOS onlyLow — read-only verification before any writesVery Low (GUI)Mac users with a card that mounts but returns errors
fsck (Terminal)macOS and LinuxMedium — deeper repair operations carry some data loss riskMedium (command line)When Disk Utility First Aid fails; FAT, exFAT, HFS+, ext4 file systems
SD Association FormatterWindows, macOS, LinuxHigh — full wipe (Quick or Overwrite mode)Very Low (GUI)Restoring card to factory-spec formatting after data has been recovered; best for long-term card health
TestDiskWindows, macOS, LinuxLow — primarily repairs partition tables without touching file contentHigh (no GUI)Cross-platform free repair of destroyed partition tables; card shows RAW but is still detected
Disk DrillWindows and macOSNone — read-only scan; does not write to source driveLow (GUI)Data recovery before any repair; 400+ file types; 500 MB free, paid for more
PhotoRecWindows, macOS, LinuxNone — read-only scan of raw storage blocksMedium (command line)Free cross-platform data recovery; works even when partition table is completely destroyed
how to fix corrupted sd card

Prevention Tips: How to Avoid SD Card Corruption Going Forward

  • Always use the safe eject function. Right-click “Eject” on Windows or drag to Trash on macOS before physically removing the card. Never pull the card while the drive activity light is on.
  • Don’t interrupt power during a write. Charge your camera’s battery before a long shoot. A dead battery mid-write is one of the most reliable ways to corrupt a card.
  • Format in-camera, not just on a computer. SanDisk’s official support recommends formatting the card using the camera or device, not a computer, after each major data transfer. In-device formatting sets up the correct parameters for that device’s file system expectations.
  • Use the SD Association Formatter when reformatting on a computer. It preserves wear-leveling alignment that OS-native formatters ignore, which extends the card’s usable lifespan.
  • Buy from reputable manufacturers. SanDisk, Kingston, and Lexar use quality NAND flash chips. Unbranded or suspiciously cheap cards frequently advertise fake capacities and fail much earlier than rated.
  • Never use a microSD card and adapter in a full-sized SD card slot if avoidable — SanDisk explicitly flags this as a documented cause of corruption errors.
  • Treat sudden write-protection as a warning sign. If your card becomes unexpectedly write-protected with the physical switch in the correct (unlocked) position, that signals controller or file system failure. Back up your data immediately before doing anything else.
  • Respect temperature limits. SanDisk cards are tested for operation between -25°C and 85°C. Heat from a car dashboard in summer or cold from winter outdoor use can push cards outside operational specs and accelerate failure.

Frequently Asked Questions

Will formatting fix SD card corruption?

Yes — a full reformat creates a fresh file system and eliminates logical corruption. But it also wipes all data. Always attempt repair tools (CHKDSK, First Aid, fsck) first to preserve your files. Formatting is the fallback when repair methods have failed, not the starting point. And note: a quick format doesn’t securely erase data; it only removes file system references, so files may still be recoverable with PhotoRec or Disk Drill after a quick format if you act fast. You might also find our article on How to Fix a Frozen iPhone: 3 Tiers From Restart to DFU helpful. You might also find our article on How to Recover Deleted Facebook Messages (2026 Guide) helpful.

Is my SD card physically dead, or is it logical corruption?

The simplest test is detection across multiple devices. If the card is detected by your computer (even if it shows errors or asks you to format it), you’re almost certainly dealing with logical corruption — which is fixable. If the card is invisible across multiple different devices and multiple card readers, physical failure is more likely. Community troubleshooting data from Quora and Raspberry Pi Stack Exchange consistently supports this triage rule.

Can CHKDSK fix my SD card if it shows as RAW?

No. According to verified troubleshooting data, CHKDSK is not available for RAW drives — the tool requires a recognizable file system to work with. If your card shows as RAW with 0 bytes used and 0 bytes free, skip CHKDSK entirely. Use TestDisk to attempt partition table repair, or run PhotoRec to recover files by scanning raw storage blocks, then reformat the card.

Should I recover my data before or after running repair tools?

Before. Always before. Repair tools — especially formatting — can overwrite the very sectors that contain your recoverable files. The moment you detect corruption, stop using the card and run a recovery tool (PhotoRec, Disk Drill, or Stellar) before touching any repair commands. This is the consistent recommendation from SanDisk’s official support documentation and across community forums.

Can a corrupted SD card repair itself?

No. Failing NAND flash chips may cause a card to enter read-only mode, which can look like the card is “stable” — but community data from the Raspberry Pi Stack Exchange indicates this is a terminal hardware state. The controller is protecting what’s left of the data, not healing itself. If your card has entered hardware-level read-only mode, copy whatever data you can and replace the card.

What to Do Right Now: Your Action Plan

If you’re sitting with a corrupted card in front of you, the path forward is clear. Stop using the card immediately — no new saves, no deletions, no formatting yet. If the card is still detected by your computer, run PhotoRec or Disk Drill first to extract your files before a single repair command touches the drive. Then work through the fix methods in order: CHKDSK on Windows, Disk Utility First Aid on Mac, fsck in Terminal if the GUI tool fails. If all repair attempts fail, use the SD Association Formatter to reformat the card with the correct file system for its capacity tier, and verify the card functions correctly before trusting it with new data again.

Troubleshooting tech problems often follows the same logic regardless of the device involved — systematic diagnosis before aggressive fixes, and always protecting what you can’t afford to lose. The same methodical approach applies whether you’re working through a printer that won’t connect or an SD card that won’t mount. If your card still fails after every software method, that’s not a defeat — it’s a clear signal to stop spending time on software and contact a professional data recovery service. Physical NAND damage is outside the scope of any free tool, and attempting further DIY repair on a physically failing card risks destroying what little data remains accessible.

One final point worth internalizing: the best time to deal with SD card corruption is before it happens. Consistent safe ejection, in-device formatting, and buying from established manufacturers cost nothing extra and eliminate most corruption scenarios entirely. Card failures that do slip through are almost always recoverable — provided you don’t overwrite the card before trying to rescue it. Just as learning how to fix screen tearing comes down to understanding the root cause before adjusting settings, SD card recovery comes down to the same discipline: diagnose first, then act.

Leave a Comment