How to Fix an SD Card That Shows the Wrong Capacity

Posted on

5 min read

An SD card that shows the wrong capacity usually has a partition problem, not a hardware failure. A 64 gigabyte card that shows 32 megabytes, or a 128 gigabyte card that shows 27 gigabytes, is almost always a card whose partition table is wrong. The missing space is still on the card, hidden behind a bad partition. The fix is to remove the partitions and create one fresh partition.

Before fixing it, save any files you need, because the fix erases the card. If the card holds photos you cannot replace, recover them first with a recovery tool. The steps below erase everything, so treat recovery as step zero.

A SanDisk SD memory card
A SanDisk SD memory card

Why the Capacity Looks Wrong

The most common cause is a card that was used in another device. A Raspberry Pi image, a camera firmware update, or a bootable installer creates small partitions and leaves the rest of the card unallocated. Windows then shows only the first partition, which can be tiny. The card is fine. Windows is only showing part of it. This guide shows how to restore the full capacity and how to tell a fake card from a real one.

A second cause is a fake card. Counterfeit cards report a large capacity but contain a small chip. They work until you write past the real capacity, then they corrupt data. A card that shows a wrong capacity after working normally for a while is suspicious. Test it with a capacity verification tool before trusting it.

A third cause is a damaged partition table from an interrupted write. Pulling a card out during a transfer can corrupt the table. The card then shows a random small size or asks to be formatted. A full repartition fixes the table and restores the real capacity.

Recover Files First

If the card holds files you need, do not format it yet. Use a recovery tool to scan the card and copy the files to your computer. Recovery tools read the raw card and ignore the broken partition table, so they often find files that Windows cannot see.

Copy the recovered files to the computer, not back to the same card. Writing to a card with a broken partition table can overwrite the very files you are trying to save. The computer drive is the safe target. Verify the recovered files open before moving on.

If the card holds nothing important, skip recovery and go straight to repartitioning. A card with no data to lose is a quick fix. The repartition takes a few minutes and restores the full capacity.

Clean the Card With DiskPart

On Windows, open DiskPart from an administrator command prompt. Type list disk, and identify the card by its size. Be very careful at this step, because choosing the wrong disk will erase the wrong drive. The card is usually the smallest disk in the list.

Select the card with select disk, using its number, then type clean. The clean command removes all partitions and the partition table. It does not damage the card. After clean, the card shows its full size as unallocated space.

Open Disk Management, right-click the unallocated card, and create a new simple volume. Choose FAT32 for cards up to 32 gigabytes, and exFAT for larger cards. A quick format is enough. The card should now show its full capacity.

The SD Association publishes a free formatter tool that restores cards to their full capacity. It removes hidden partitions and writes a clean file system. Use it when DiskPart feels risky, because it only touches removable cards.

Fix It on macOS or Linux

On a Mac, open Disk Utility, select the card, and click Erase. Choose exFAT for large cards and FAT32 for small ones. If the card shows a small size, use the Partition view to delete all partitions first, then create one partition that fills the card. The full capacity should appear.

On Linux, use GParted or the command line. Delete all partitions on the card, create a new partition table, and add one partition that fills the device. Format it as FAT32 or exFAT. The card then shows its true size.

On any system, verify the result by copying a large file to the card and reading it back. A card that reports the right capacity but fails a large file test is likely fake or failing. Trust the file test more than the reported size.

When the Card Is Really Failing

If repartitioning does not restore the capacity, the card may be damaged. A card that shows a different wrong size on every computer has a controller fault. A card that formats but loses data has worn-out flash. Neither can be fixed by software.

Test a suspect card with a verification tool that writes to every part of the card and reads it back. A healthy card passes the full test. A fake or failing card fails past its real capacity. The test takes a while on a large card, but it gives a certain answer.

Replace a card that fails the test. SD cards are cheap, and a failing card will eat your photos sooner or later. Keep the receipt, because a genuine card from a reputable seller usually has a warranty. A fake card has no warranty and no fix.

This is only one piece of the sd-card puzzle. The articles below fill in the rest.

Related Articles: