
Before we start: Donemax Data Recovery is a powerful data recovery program. It supports to recover inaccessible or lost files from any SD card. Before or after repairing the corrupted SD card with Command Prompt, you can use this data recovery tool to recover deleted, formatted or inaccessible files from the card.
PAGE CONTENT:
SD cards are widely used in digital devices for storage purposes. However, they can become corrupted due to various reasons. When an SD card gets corrupted, it may not be accessible, preventing users from reading or writing data.
Fortunately, Windows Command Prompt (CMD) provides several built-in tools to repair corrupted SD cards. This guide will walk you through the step-by-step process of using Command Prompt to fix an SD card, ensuring that your data is restored if possible. Before proceeding, it's essential to back up any important files if your SD card is still partially accessible, as some repair methods may erase data.
Common Symptoms of a Corrupted SD Card
Before repairing the SD card, it's crucial to identify whether it is indeed corrupted. Here are some common signs of corruption:
1. SD Card Not Recognized:
- The computer does not detect the SD card when inserted.
- Neither File Explorer nor Disk Management display it.
2. Error Messages:
- "You need to format the disk before using it."
- "The file or directory is corrupted and unreadable."
- "Please insert a disk into USB drive."
3. Files Become Inaccessible or Disappear:
- Some or all files on the SD card are missing.
- The file system changes to RAW format instead of FAT32, exFAT, or NTFS.
4. Slow Performance and Frequent Disconnections:
- The SD card takes a long time to load files.
- It keeps disconnecting and reconnecting on its own.
If your SD card exhibits any of these symptoms, follow the steps below to fix it using Command Prompt.
Recover Inaccessible or Lost Files from a Corrupted SD Card
Before using CMD to repair your corrupted SD card, you can use data recovery program to recover inaccessible or lost files from the SD card.
Step 1. Download and install Donemax Data Recovery on your computer and insert the SD card into your computer.
Step 2. Open Donemax Data Recovery, then select the corrupted SD card to start data recovery.
Step 3. Click on Scan button to deeply scan the corrupted SD card and find all recoverable files including existing files, inaccessible files, deleted/formatted/lost files, etc.
Step 4. After scan, you can preview all recoverable files. Then select the wanted files, click on Recover button to save these files to a safe location.
Donemax Data Recovery also can help you repair corrupted SD card. Just choose Disk Manager tool, select the SD card, click on Repair button.
How to Fix Corrupted SD Card Using Command Prompt?
Prepare for the Repair Process
1. Insert the SD Card and Check Detection
- Put the SD card into your PC's card slot or card reader.
- After launching File Explorer, see if the SD card is listed under "This PC."
- To access Disk Management if the SD card is not visible, press Win + X and choose Disk Management.
- Right-click on the SD card, select Change Drive Letter and Paths, then assign a letter (such as E: or G: H:) if the device is identified but does not yet have a drive letter.
2. Open Command Prompt as Administrator
To open the elevated Command Prompt, press Win + S, type cmd, and choose Run as Administrator.
Use CHKDSK to Fix the SD Card
CHKDSK (Check Disk) is one of the most effective tools for diagnosing and repairing file system issues on a corrupted SD card. This command scans the drive for errors, fixes logical file system corruption, and attempts to recover readable data from bad sectors.
What is CHKDSK and How Does It Work?
CHKDSK is a Windows utility that examines the integrity of file systems and metadata on a storage device. When an SD card becomes corrupted, errors such as bad sectors, cross-linked files, and incorrect file allocation table entries may arise. CHKDSK scans for these issues and repairs them, restoring the SD card to working condition.
How CHKDSK Helps in Repairing an SD Card:
- Scans the SD card for logical errors and fixes them.
- Identifies and marks bad sectors to prevent future data corruption.
- Recovers readable data from damaged sectors.
- Repairs corrupted file system structures (FAT32, exFAT, or NTFS).
Step-by-Step Guide to Running CHKDSK on a Corrupted SD Card
Step 1: Open Command Prompt as Administrator
- Type cmd after pressing Win + S.
- To run as administrator, right-click Command Prompt and choose Run as administrator.
Step 2: Identify the SD Card's Drive Letter
- Open File Explorer (Win + E).
- Check under This PC to find the assigned letter for the SD card (e.g., H:).
Step 3: Run the CHKDSK Command
- In Command Prompt, type the following command and press Enter:
chkdsk X: /f /r /x
(Replace X with the actual drive letter of your SD card.)
Step 4: Understand the Parameters Used in CHKDSK
Each flag in the CHKDSK command serves a specific function:
- /f – Fixes detected errors on the disk.
- /r – Identifies and recovers readable data from bad sectors.
- /x – Forces the volume to dismount before scanning to prevent conflicts.
Step 5: Analyze the Results
Once the scan is complete, you will see one of the following messages:
- "Windows has made corrections to the file system." - This means CHKDSK successfully repaired errors, and the SD card should work fine.
- "CHKDSK found no problems." - If the SD card still doesn't function properly, consider other solutions like formatting.
- "CHKDSK is not available for RAW drives." - This indicates that the SD card's file system is completely corrupted. Proceed with the Diskpart formatting method to restore functionality.
What to Do If CHKDSK Fails?
If CHKDSK does not fix the corruption, try the following alternative solutions:
- Use CHKDSK without the /r parameter: Sometimes, scanning for bad sectors (/r) may take too long. Try running:
chkdsk X: /f /x
- Run CHKDSK in Safe Mode:
- Restart your computer and enter Safe Mode (Shift + Restart > Troubleshoot > Advanced Options > Startup Settings > Safe Mode).
- Run CHKDSK again in Safe Mode.
- Check SD Card on Another Computer or Card Reader: Occasionally, the computer's SD card reader - rather than the SD card itself - may be the problem.
- Use a Third-Party Tool for Repair: Third party tools offer deeper SD card repair functionalities.
CHKDSK is a powerful tool that can repair minor corruption issues in an SD card. However, if it fails to resolve the problem, consider formatting the SD card using Diskpart or using third-party data recovery software before formatting. Always back up important data regularly to avoid losing critical files in case of corruption.
Format the SD Card via Command Prompt (If Necessary)
If CHKDSK cannot fix the SD card, you may need to format it to restore functionality. Formatting erases all data, so proceed only if data recovery is not a priority.
Step-by-Step Guide to Formatting the SD Card with Diskpart:
Step 1. Open Command Prompt and type:
diskpart
(Press Enter. This will launch the Diskpart utility.)
Step 2. List all connected drives:
list disk
(Identify your SD card based on its storage size.)
Step 3. Select the SD card:
select disk X
(Replace X with the SD card's disk number.)
Step 4. Clean the SD card:
clean
(This removes all partitions and data from the SD card.)
Step 5. Create a new partition:
create partition primary
Step 6. Format the SD card:
format fs=fat32 quick
(For SD cards larger than 32GB, use format fs=exfat quick instead.)
Step 7. Assign a drive letter:
assign
Step 8. Exit Diskpart:
Exit
After formatting, your SD card should be functional again.
Additional Troubleshooting Steps
If the above methods don't work, try these additional fixes:
1. Update SD Card Drivers
Step 1. Press Win + X and select Device Manager.
Step 2. Expand Disk drives and locate your SD card.
Step 3. Right-click the SD card and choose Update driver.
Step 4. Select Search automatically for drivers.
2. Check for Physical Damage
- Inspect the SD card for cracks, scratches, or bent connectors.
- Try using a different SD card reader or another computer.
3. Use Third-Party Data Recovery Tools
If the SD card is still inaccessible, tools like Donemax Data Recovery, Recuva, EaseUS Data Recovery, or Disk Drill can help recover lost files before formatting.

How to Recover Lost or Inaccessible Files from Corrupted SD Card
Recover inaccessible or lost videos, images and documents from a corrupted SD card on Windows or macOS.
Preventive Measures to Avoid Future SD Card Corruption
To minimize the risk of SD card corruption, follow these best practices:
- Always Eject Properly: Use "Safely Remove Hardware" before unplugging the SD card.
- Avoid Sudden Power Loss: Do not remove the SD card while transferring files.
- Use Reliable SD Cards: Purchase from reputable brands like SanDisk, Samsung, or Kingston.
- Backup Data Regularly: Store important files on cloud storage or external drives.
- Scan for Viruses: Use antivirus software to protect your SD card from malware infections.
Conclusion
A corrupted SD card can be frustrating, but in most cases, Command Prompt tools like CHKDSK and Diskpart can repair the issue. If CHKDSK fails, formatting the SD card is the last resort to restore usability. Additionally, keeping your SD card in good condition by ejecting it properly and performing regular backups can help prevent future corruption.
If your SD card remains unreadable after trying all the methods mentioned, consider professional data recovery services to retrieve lost files.
By complying this article, you can effectively diagnose and repair a corrupted SD card using Command Prompt, ensuring minimal data loss and prolonged usability of your storage device.


Donemax Data Recovery
Donemax Data Recovery is one of the best data recovery software. It is easy-to-use and can help in recovering deleted, formatted, inaccessible or lost data from HDD/SSD, external disk, USB drive, SD card, camera or other storage devices.
Related Articles
- Oct 29, 2024Fix Finder Not Working or Not Responding on Mac
- Dec 25, 20248 Solutions to Fix The Disk Couldn't Be Ejected Because the Finder Is Using It
- Sep 25, 2024Unable to Mount Seagate Backup Plus Portable Hard Drive on Mac? Fix It Now
- Jan 15, 2025USB Drive Requires to Be Formatted: How to Fix It
- Feb 11, 2025How to Repair an xD Card: A Comprehensive Guide
- Feb 20, 2024How to Fix External SSD Not Mounting on Mac?

Lucien
Lucien is a writer and a chief programmer of Donemax software who has worked in the company for 5+ years. He has written much of the content on the site and devotes to providing troubleshooting and solution for Windows and Mac users including disk cloning, data recovery, migration, eraser, error fixes.

Gerhard Chou
In order to effectively solve the problems for our customers, every article and troubleshooting solution published on our website has been strictly tested and practiced. Our editors love researching and using computers and testing software, and are willing to help computer users with their problems
Hot Donemax Products

Clone hard drive with advanced clone technology or create bootable clone for Windows/Mac OS.

Completely and easily recover deleted, formatted, hidden or lost files from hard drive and external storage device.

Certified data erasure software - permanently erase data before selling or donating your disk or any digital device.