Formatting an SSD in Command Prompt is the most direct way to completely wipe the drive and prepare it for a fresh operating system installation or to resolve persistent performance issues. Before you begin, understand that this process erases every file and partition on the selected drive, so back up any data you need to keep, this step is not optional.
Launch DiskPart to format SSD in Command Prompt
This gives you the administrative privileges required to modify disk structures. Type diskpart and press Enter to launch the DiskPart utility, which is the built-in Windows tool for managing disks and partitions. Once DiskPart is running, type list disk and press Enter to display all connected storage devices. Identify your SSD by its size, the listed disks show their total capacity, so match that number to the SSD you intend to format. Write down the disk number (e.g., Disk 1) because the next step depends on selecting the correct one.
Step 2: Select and clean the SSD
Type select disk X and press Enter, replacing X with the disk number you identified. This command tells DiskPart that all subsequent operations will target that specific drive. Warning: Selecting the wrong disk will result in irreversible data loss. Double-check the disk number against the size shown in list disk before proceeding. After the selection is confirmed, type clean and press Enter. This command removes all partition and volume formatting from the selected disk, leaving it in an unallocated state, essentially a blank drive with no structure. If you need a more secure erase that overwrites every sector with zeros, use clean all instead; this takes significantly longer but makes the previous data unrecoverable by standard tools.
Step 3: Create a new partition and format it
With the SSD now clean and unallocated, type create partition primary and press Enter. This creates a single primary partition that spans the entire drive. Then type format fs=ntfs quick and press Enter to format that partition with the NTFS file system. The quick parameter speeds up the process by skipping a full sector-by-sector scan, which is fine for a new partition on a healthy SSD. If you need a different file system, such as exFAT for compatibility with other operating systems, replace ntfs with your desired format, but NTFS is the standard choice for Windows installations.
Step 4: Assign a drive letter and exit
Type assign and press Enter to let Windows automatically assign the next available drive letter to your new partition. Alternatively, you can specify a letter by typing assign letter=Y (replace Y with your preferred letter). This step makes the SSD visible in File Explorer and ready for use. After the assignment, type exit and press Enter to close DiskPart. You can also close the Command Prompt window entirely, the formatting is complete.
Step 5: Verify the format and enable TRIM
Open File Explorer and navigate to "This PC" to confirm your SSD appears with the assigned drive letter. Double-click it to ensure you can open and save files without errors. To verify the format was successful from a system level, you can copy a small file to the drive and open it back up. For long-term SSD health, check that TRIM is enabled. Type fsutil behavior query DisableDeleteNotify and press Enter in an elevated Command Prompt. A result of 0 means TRIM is active, which helps maintain SSD performance by informing the drive which data blocks are no longer needed. If the result is 1, TRIM is disabled, type fsutil behavior set DisableDeleteNotify 0 and press Enter to enable it. Windows normally enables TRIM automatically for supported SSDs, but this check ensures your drive operates at peak efficiency over its lifespan.

















