About this tool
Why this page only writes commands
A web page cannot format, partition or wipe a disk. Browsers have no API for raw block devices, WebUSB refuses the mass-storage class, and the operating system's own driver already owns the drive. That is deliberate: a site that could erase disks would be a disaster waiting for one wrong click. So this page does the part that is actually hard to get right — choosing the file system, the partition table and the exact flags for your operating system — and hands you the commands to paste into Terminal, PowerShell or a shell yourself.
Which file system: pick by where the drive is going
exFAT is the answer when the drive moves between a Mac and a Windows PC: both read and write it, and there is no 4 GB file limit. FAT32 is for TVs, car stereos, game consoles and older cameras that read nothing else; the cost is that no single file can exceed 4 GB. NTFS is for a drive that stays on Windows — macOS has historically mounted it read-only, and this page does not re-verify current behaviour. APFS is Mac-only and the right choice for Time Machine; Windows cannot read it. ext4 is Linux-only and invisible to Windows and macOS by default. Choose GPT as the partition table unless an old device refuses it, then MBR. Writing an ISO to make a bootable installer is a different job and is out of scope here.
The disk id is the one thing that matters
Every destructive command on this page uses the placeholder <DISK> until you type the identifier yourself; the page never pre-fills it and never guesses. The first step is always to list disks — diskutil list external physical on macOS, Get-Disk | Where-Object BusType -eq USB in PowerShell, lsblk -o NAME,SIZE,MODEL,TRAN,MOUNTPOINTS on Linux — and to match the size and model to the drive in your hand. If you enter disk0 to disk3, Windows disk 0, sda, mmcblk0 or an nvme device, the page shows a red warning because those are usually the system disk, but it cannot stop you: it does not know your machine. Windows' Clear-Disk is emitted without -Confirm:$false on purpose, so the system still asks before wiping. The Windows steps use PowerShell storage cmdlets instead of diskpart because the documented format command in diskpart lists NTFS, FAT, FAT32 and UDF but not exFAT, while Format-Volume lists exFAT.
Windows and FAT32 over 32 GB
Windows' own formatting tools refuse to create a FAT32 volume larger than 32 GB. That is a limit of the Windows tools, not of FAT32: the file system itself goes far beyond that (2 TB with standard sectors), and a 64 GB card formatted on a Mac or on Linux reads fine on Windows afterwards. In 2026 Microsoft announced raising the command-line limit to 2 TB in a Windows Insider build; it is not generally available, so the page does not rely on it. Your options are exFAT if the device accepts it, or formatting the drive on macOS with diskutil eraseDisk FAT32 or on Linux with mkfs.vfat -F 32. Third-party Windows tools exist too; this page does not endorse any of them.
Shrinking a fake-capacity drive to what it really holds
A drive that claims 256 GB but silently loses data past 16 GB can still serve as a 16 GB drive if its partition ends before the fake region. This page needs a measured real capacity — from f3probe (F3) or H2testw, not from the label — and builds a plan that uses an MBR table and ends the partition at least 1 MiB short of that figure. On macOS that is a diskutil partitionDisk call with explicit sizes; on Windows New-Partition -Size; on Linux a parted end in MiB. F3 users can instead run the f3fix line that f3probe prints. Fake drives tend to be slow and unreliable even inside the real region, so treat the result as a scratch drive, not a place for anything you cannot lose.
Checked against the docs, not run on your hardware
Every command template was checked against the official documentation on 2026-10-17: Apple's diskutil man page, Microsoft Learn for the storage cmdlets, and the Linux man pages for wipefs, parted, mkfs.exfat, mkfs.fat, mke2fs and mkntfs. None of the combinations has been executed on real hardware by us, which is why the output is labelled untested, and operating-system updates do change behaviour. Run the verify step at the end — diskutil list, Get-Volume, lsblk -f — and read what it prints before trusting the drive.