How can I fix an SD card corrupted after improper ejection?

I accidentally ejected my SD card without safely removing it, and now my phone and computer either won’t read it or say it’s corrupted. It has important photos and files on it, so I need help figuring out how to recover the data and repair the SD card without making things worse.

I’ve messed with enough broken SD cards to stop caring about the pop-up text. The message changes. The next step matters more. I’ve seen this with camera cards, drone footage, phones, and a few panic texts from friends who thought years of photos were gone.

The mistake I keep seeing is simple. People try to fix the card first. Bad move, most of the time. Your phone or PC throws out stuff like “SD card needs to be formatted,” “Repair this drive,” or “Tap to fix.” I skip all of it at first. If your files matter, don’t format the card yet.

Formatting might get the card working again. It also makes recovery messier. I treat this as two jobs. First, pull the files off. After that, deal with the card.

Recover data first

When corruption hits, the file system is often the part falling apart, not the files themselves. So I start with recovery software, not repair tools.

Out of the stuff I’ve tried, Disk Drill is usually where I start. It has done well for me with cards showing up as RAW, cards formatted by mistake, files missing after a transfer failed, and the usual “this card looks dead” cases.

The part I care about most is the byte-for-byte backup option. Some damaged cards get worse the more you poke at them. I’ve seen cards read fine for ten minutes, then drop off the system. Making an image first gives you a safer copy to work from. The preview tool helps too. You get to check whether the photos or videos open before you spend time recovering junk file names with ruined contents.

Once your stuff is recovered and copied somewhere safe, then go after the card itself.

1. Try CHKDSK

This is usually my first repair step on Windows. It checks the file system and fixes what it finds.

Open Command Prompt as Administrator, then run:

chkdsk X: /r

Swap X for the drive letter of your SD card.

I’ve had this work on cards with directory errors and ugly file system damage. I’ve also had it do nothing. Still worth the two minutes.

2. Use TestDisk if the partition is gone

If Windows shows the card as unallocated, or the partition vanished, I move to TestDisk.

It looks old and feels old. No point pretending othrwise. Still, it’s one of the few tools I’ve used which finds lost partitions and rebuilds busted partition tables without much drama. If the card looks invisible to normal Windows tools, this is often the next thing I try.

3. Format the card last

If CHKDSK didn’t help, and TestDisk didn’t bring it back, formatting is where I end up.

At this stage, your important files should already be off the card. In File Explorer, right-click the SD card, hit Format, then pick the file system. For most newer SD cards, exFAT tends to be the safe pick since it handles large files and works with a lot of devices.

After formatting, test it before trusting it. Copy a few files over. Delete them. Write again. Read them back. I’ve had cards pass a format and still act weird an hour later.

One thing I learned the annoying way, corruption often shows up before full failure. If a card starts doing this more than once, I stop using it for anything I care about. Photos, video, trip footage, client work, none of it goes back on taht card. I replace it.

Do not keep plugging the card in and out. Every mount attempt writes logs, cache, or retry data. On flaky flash media, more reads and writes = worse odds. I mostly agree with @mikeappsreviewer on skipping repair first, but I would add one thing before any tool. Try a different reader. A bad USB reader or phone slot causes a lot of fake “corruption” cases. I’ve seen cheap adapters fail more often than the card itself. My order would be: 1. Lock the SD card, if it has a physical switch. 2. Try a known good card reader on a computer, not the phone. 3. If it mounts even once, copy the whole card with a disk image tool first. 4. If you need file recovery, Disk Drill is a solid pick because it handles deleted files, RAW cards, and damaged file systems without forcing a repair first. 5. On Linux or macOS, try read-only mounting before repair. Better than letting Windows take a swing right away. 6. Check the card’s health after recovery with H2testw or F3. If capacity tests fail, toss it. One place I differ a bit from @mikeappsreviewer, CHKDSK is fine on a card you no longer care about, but I don’t love using it early on photo cards. It “fixes” file system structure, which sometiems means orphaned files and renamed folders. Better for making a volume mount again, worse if your goal is neat recovery. If the card shows 0 bytes, disconnects randomly, or gets hot, skip software and go to a pro lab. Flash failure gets ugly fast. For extra SD card photo recovery steps and corrupted memory card tips, this thread has some useful case-by-case ideas: more tips for recovering a corrupted SD card with important photos If you recover the files, replace the card. Improper eject sometimes exposes an existing card problem, it does not always cause the whole mess by itself.
Don’t keep trying random fixes on the card. That’s how a recoverable mess turns into a dead card. I mostly agree with @mikeappsreviewer and @viaggiatoresolare about not jumping straight into repair, but I’m a little more cautious about phones specifically. If the card was in an Android phone, stop putting it back in there. Phones love to offer “fix” prompts, and sometimes they just make the file system even uglier. What I’d do: 1. Use a full-size SD adapter or a decent USB reader on a computer. 2. If the card appears at all, copy off the easy stuff first. Don’t wait for a perfect recovery plan. 3. If folders won’t open or the card shows RAW, use recovery software instead of repair tools first. Disk Drill is usually a solid place to start for corrupted SD card recovery because it can scan damaged or unreadable cards and pull photos, videos, and documents without requiring you to format first. That matters a lot here. Also, one thing not mentioned enough: check Disk Management on Windows. If the card shows the right capacity but no drive letter, assign one manually. I’ve seen “corrupted” cards come back from just that. If it shows the wrong size, 0 bytes, or keeps disconnecting, that’s more like hardware failure than bad ejection. If you want a decent roundup of SD card recovery apps, this is worth a look: best SD card recovery software tested for real photo and file recovery. After recovery, reformat the card fully, not quick format, and test it. If it flakes out again, toss it. Cards are cheap. Lost pics aren’t.
I’d add one check nobody’s emphasized enough: figure out whether this was a file system problem or encryption problem. If that SD card was formatted by your phone as internal/adopted storage, a computer may always see gibberish or demand format. In that case, normal PC recovery is a lot less useful unless the phone can still read parts of it. Where I slightly disagree with @mikeappsreviewer: grabbing “easy files first” is fine only if the card is reading stably. If it drops connection, imaging the card before cherry-picking files is safer. Extra things to try: - Clean the contacts gently with isopropyl alcohol and let it dry. - Check Event Viewer on Windows or Console on Mac for I/O errors. That tells you if the reader is failing at hardware level. - On Linux, `ddrescue` is often better than ordinary copying for unstable cards because it skips bad areas and revisits them later. - If photos are your priority, try photo-specific recovery after imaging, not just general file recovery. Disk Drill fits well here if the card is detected at all. Pros: - good preview for photos and videos - can work on damaged or RAW cards - byte-level backup/imaging is useful Cons: - not magic if the card keeps disconnecting - deeper scans can be slow - recovered filenames/folder structure may be messy Also worth knowing, TestDisk and PhotoRec can outperform paid tools in some edge cases, especially when the file system is toast. If recovery succeeds, retire the card. Improper eject can trigger the issue, but usually the card was already halfway to failing.