ByteScope

USB Format Guide

Pick your OS and what the drive is for to see the commands, then type your disk number to unlock copying. This page never touches your drive — you run the commands, after checking the disk number twice.

Runs in your browser and touches no disk. It only writes commands, and you run them yourself.

Your computer

Filled in from your browser. Change it if it is wrong.

The drive

A purpose fills in a file system and a partition table. You can still change both.

What this page cannot do

  • This page cannot format anything. Browsers have no permission to touch a disk, by design. It only writes commands, and you run them yourself on your computer.
  • Check the disk number again before you run any command. The wrong number erases that whole disk, and if it is your system disk, your system too.
  • The commands follow the vendors' documentation, but operating system updates can change behaviour. Check the date above before you rely on them.

Commands

Choose your operating system above to see the commands.

Prefer clicking? Use the built-in tool

macOS
Open Disk Utility and choose View, then Show All Devices. Select the drive itself, the top entry rather than the indented volume, click Erase, then set Name, Format and Scheme.
Windows
Right-click Start and choose Disk Management. To reformat a volume, right-click it and choose Format. To use unallocated space, right-click it and choose New Simple Volume.
Linux
Open GNOME Disks, select the drive in the list, open its menu and choose Format Partition. Pick the file system and a name, then confirm.

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.

Frequently asked questions

Which format works on both Mac and Windows?

exFAT. Both operating systems read and write it without extra software, and it has no 4 GB file-size limit. Use a GPT partition table unless the drive also has to work in an old TV or car stereo, in which case choose MBR. FAT32 also works on both but caps every file at 4 GB.

Why won't Windows format my 64 GB drive as FAT32?

Because Windows' own formatting tools stop at 32 GB for FAT32. The file system itself goes far beyond that. Format the drive as FAT32 on a Mac or Linux machine, or switch to exFAT if the device that will read it supports it. Microsoft has announced a 2 TB command-line limit in a Windows Insider build, but that is not generally available yet.

How do I find my disk number?

Run the identify step the page gives first: diskutil list external physical on macOS, Get-Disk | Where-Object BusType -eq USB in an administrator PowerShell, or lsblk -o NAME,SIZE,MODEL,TRAN,MOUNTPOINTS on Linux. Match the size and model to your drive, unplug it and run the command again if two look alike. disk0, Windows disk 0 and sda, mmcblk0 or nvme devices are usually the system disk.

Will this page format my drive for me?

No. A browser cannot access raw disks, by design, and this site has no helper program. The page only assembles commands; nothing happens until you paste them into a terminal on your own computer and press Enter.

Can I undo a format?

No. eraseDisk, Clear-Disk, wipefs and mklabel destroy the partition table and the file system; the data is gone unless you have a backup. Recovery software may scrape fragments from an erased drive, but this page makes no promise about that. Check the disk id twice before the destructive step.

How do I shrink a fake drive to its real capacity?

Measure the real capacity first with f3probe or H2testw, enter that figure on the page, and it generates an MBR plan whose partition ends at least 1 MiB before the measured size. Below about 64 MiB of usable space the page refuses, because the drive is not worth keeping. If you already use F3, f3probe prints an f3fix command you can run instead.

How long can an exFAT volume label be?

11 UTF-16 characters, and it cannot contain " * / : < > ? \ |. FAT32 also allows 11 characters, but only printable ASCII, and the label is uppercased. NTFS allows 32 characters and ext4 16 bytes. The page checks the label as you type and also rejects quotes, $, backslashes and semicolons on every file system, because the label ends up inside a shell command.