Sometimes, when you insert an SD card into your device, you might run into an error message saying your “SD card needs to be formatted.” It is typically a file system error that requires troubleshooting or formatting the SD card to make it accessible on a specific device. In this blog post, we’ll analyze the causes of “SD card needs to be formatted” error and see methods to fix it.
The “SD card needs to be formatted” is a common error caused by one or more than the below listed reasons:
- SD card is corrupted or damaged.
- Interruption during writing on the SD card.
- Ejecting the SD card while the drive is in use.
- The file system of the SD card is unsupported or incompatible.
- SD card’s flash memory may be worn out or failing.
- Bad sectors in the memory card.
- The SD card is write-protected, which blocks any changes to its data.
- A virus or malware infection is affecting the card.
- You are using a low-quality or counterfeit memory card.
- The card reader driver on your computer is outdated or corrupted.
- The SD card was removed without using the Safely Remove Hardware option.
Once you have recovered the media files stored in the SD card, you can try the methods mentioned below to resolve the “SD card needs to be formatted’’ error:
Solution 1: Use Different USB Port
Connect your SD card to a different port on your Mac or Windows PC and check if you can access the card or not. Moreover, if the SD card reader you are using is damaged or faulty, immediately change it.
Solution 2: Scan with Antivirus Software
Often, virus-infected SD card may be the reason why you see the ‘SD card needs to be formatted’ error. In such a scenario, use Windows Defender or any third-party antivirus software to scan your affected memory card.
Solution 3: Remove Write Protection
A write-protected SD card cannot be formatted or modified until you turn off the protection. Most SD cards have a small lock switch on the side. Slide it away from the “Lock” position and reinsert the card. If the card has no physical switch, open Command Prompt as administrator, type diskpart, then run the commands list disk, select disk X (X is your SD card disk number), and finally type attributes disk clear readonly. The message ‘Disk attributes cleared successfully’ will be displayed after a successful fix.

Solution 4: Update or Reinstall the SD Card Reader Driver
An outdated or corrupted card reader driver can trigger the formatting error. Press Windows + X and select Device Manager. Expand Disk drives, right-click your SD card, and select Update driver. Choose Search automatically for updated driver software, install any available update, and restart your computer.
Solution 5: Change the Drive Letter
If your computer does not detect the SD card at all, it may be missing a drive letter. Press Windows + R, type diskmgmt.msc, and press Enter. Right-click the SD card volume and select Change Drive Letter and Paths. Click Add, choose a new letter, and click OK. Reconnect the card and check if it now appears in File Explorer.
Solution 6: Use Windows Built-in Error Checking Tool
Repair a damaged SD card using a built-in free Windows utility tool named Error Checking. Here’s how to fix a corrupted/damaged SD card using this tool:
- Type File Explorer in the Windows search bar and click Open to launch it.

- Look for the affected SD card, right-click on it, and choose Properties.

- Go to the Tools tab and click Check.

- Select Scan and Repair drive.

Solution 7: Run CHKDSK Command
CHKDSK can repair minor file system corruption on an SD card, internal drive, or external drive, but it works only on a file system that Windows recognizes. If your card shows up as RAW, Windows won’t be able to determine the file system, and CHKDSK will not be able to complete its usual repair. Because the /f parameter modifies file system structures directly, repairs to FAT file system can sometimes result in data loss. You can use this method as a fix for minor corruption, and run it only after you have recovered your files. Here’s how to run the CHKDSK scan:
- Type CMD in the Windows search and click Open to launch Command Prompt.
- Type chkdsk X: /r /f and press Enter. (Here X is the affected drive volume letter.)

If CHKDSK reports it cannot determine the file system, or if the above methods don’t resolve the error, you need to format your SD card. However, first make sure to recover the data stored on it.
Solution 9: Format the SD Card Using Windows Disk Management
Note: You can format the SD card only after you have recovered your data and ruled out a defective or failing card.
If none of these above solutions resolve the error and the card is still detected, does not disconnect randomly, and shows no signs of physical damage, formatting is usually the appropriate next step. Choose a file system that matches how you plan to use the card – FAT32 gets widest device compatibility, exFAT is for cards larger than 32GB and for usage across either Windows and Mac devices, or NTFS if the card will be used on Windows only.
To format the card using Windows Disk Management, type Computer Management in the Windows search bar and open it. Select Disk Management in the left pane, right-click your SD card volume, and choose Format, then pick the file system you determined above. Select run a quick format, and click OK. Once formatting completes, reconnect the card and copy a few files to it to confirm it works correctly before you move your recovered data back.
Solution 10: Format the SD Card with a Dedicated SD Card Formatter Tool
If the Windows formatting options do not fix the error, use the SD Memory Card Formatter, the official formatting tool developed by the SD Association (SDA) for SD, SDHC, SDXC, and SDUC cards.
The SDA recommends this tool over generic formatting utilities because it strictly follows the SD File System Specification and helps avoid performance or capacity issues post formatting. It works on both Windows and Mac and can often fix formatting errors that File Explorer or Disk Management cannot.
Unlike Windows, there are only a couple of native methods to fix this error on a Mac: you can use the First Aid feature inside Disk Utility, or you can also use Terminal with caution. While First Aid is considered safe, Terminal possesses various risks, such as permanent card damage or data loss even if a single command is mistyped.
Because both repair methods stress a corrupted file system, which can cause an already failing SD card to lock up permanently, the safest approach to protect your data is using specialized SD card recovery tool before proceeding.
Solution 1: Repair the SD Card Using Disk Utility on Mac
Mac users can fix a formatting error in SD card with the built-in Disk Utility.
- Open Spotlight Search and launch Disk Utility.

- From the menu bar, select your SD card.

- Click First Aid from the top bar and choose Run.

- The macOS scans the card and repairs any errors it finds.

Apart from Disk Utility there’s one more method but you need to cautiously approach this and only if your data is not very important and you have already recovered them from the SD card.
Solution 2: Terminal Command (Exercise with Caution)
If Disk Utility First Aid fails, you can use Terminal to force macOS to bypass standard system checks and attempt a manual file system repair.
Note: This method is intended strictly for advanced users and requires a cautious approach. Terminal requires typing manual command lines and does not feature any “Undo” button or confirmation prompts.
A single mistyped character or incorrect drive number can instantly and permanently erase your Mac’s internal hard drive. Therefore, proceed at your own risk, and ensure your data is backed up before continuing.
Step 1: Identify Your SD Card’s Precise Identifier
You must find the exact system name of your SD card to avoid fixating on the wrong drive.
- On your Mac – Press Cmd + Space, and type Terminal, and press Enter to open.
- Type diskutil list and press Enter.

- Look through the list to find your SD card by matching its storage size (e.g., 32 GB or 64 GB).
- Locate the IDENTIFIER column on the far right. Note down the disk number (e.g., disk2 or disk3). (In the following steps, replace the X in diskX with your exact disk number.)
Step 2: Force Unmount the Card
Your Mac cannot repair the card while the operating system is actively trying to read it.
- Type diskutil unmountDisk diskX and press Enter.

- Wait until you see the confirmation message: Unmount of all volumes on diskX was successful.

Step 3: Run the Forced Repair Command
Execute the repair command based on how your SD card was originally formatted:
- For ExFAT Cards (Typically 64GB or larger):
sudo fsck_exfat -d diskX

- For FAT32 Cards (Typically 32GB or smaller):
sudo fsck_msdos -y diskX
Once completed, press Enter after typing the correct command for your card type. Enter your Mac’s admin Password when prompted and press Enter.
(Note: Terminal will not show characters or asterisks while you type your password for security reasons—type it as you remember and hit Enter).
Whenever you encounter an “SD card needs to be formatted” error, the main priority should be to recover the media files stored on it to avoid any data loss situation. Use a reliable SD card recovery software like Stellar Photo Recovery to restore lost photos, videos, and audio files from an SD card that needs formatting.
This tool can recover lost or deleted media files from corrupted/ damaged/ inaccessible SD card (Mini, Micro, SDHC, SDXC) memory cards, compact flash, CF cards, and more.
Here is the step-by-step method to recover media files from the SD card using Stellar Photo Recovery:
Step 1: Connect the SD card to your computer using an SD card reader.
Step 2: Download, install, and launch Stellar Photo Recovery software on your PC. Select what you want to recover.

Step 3: From the home screen, select the SD card from which you want to recover your files and click Scan.

Step 4: The scanning will start and once completed, you can see the scan result and Preview the recoverable files.

Step 5: Select the photos and media files you want to restore, click Recover and browse the location to save them at a desired location.
Tip: Many photo recovery tools, including Stellar Photo Recovery, can also check the SMART health status of your SD card. This shows early signs of wear, so you know whether the card is worth reusing or should be replaced.
How to Prevent SD Card Errors in the Future
A few simple habits can help you avoid the ‘SD card needs to be formatted’ error going forward:
- Use trusted, high-quality SD cards from reputable brands.
- Always use the Eject or Safely Remove Hardware option before removing the card.
- Avoid using the same SD card across too many devices.
- Turn off your camera or phone before inserting or removing the card.
- Back up important files regularly to cloud storage or an external drive.
- Avoid interrupting a file transfer or format once it has started.
Conclusion
After going through the methods listed above, you can proceed to resolve the ‘SD card needs to be formatted’ error. But the priority should be to first recover the lost photos and other media files from the SD card using a professional photo recovery software, Stellar Photo Recovery.
First, try using a different USB port or scan the SD card with an antivirus software to resolve any underlying issue. Additionally, you can use Windows built-in error checking tool or run the CHKDSK command to repair a damaged or corrupted SD card. If you use a Mac, Disk Utility offers a similar fix too.