M.2 SSD Form Factors and Keying: B-Key, M-Key, and Why Some Slots Won't Fit Your Drive
"M.2" isn't a single standard so much as a family of physical and electrical variations that happen to share a connector shape. Length and key notch position are the two variables that decide whether a specific drive will physically fit a specific slot at all.
The four-digit number stamped on an M.2 drive — 2230, 2242, 2260, 2280, or 22110 — describes its physical dimensions in millimeters: the first two digits are width, and the remaining digits are length. 2280 (22mm wide, 80mm long) is by far the most common size in desktop and mainstream laptop motherboards, while 2230 and 2242 show up in compact laptops, handheld gaming PCs, and small form factor systems where board space is tight, and 22110 (110mm long) appears mainly in enterprise and some high-capacity workstation drives. A motherboard's M.2 slot typically supports a specific drive length or a small range of lengths via multiple screw-mounting positions along the slot, and a drive longer than the slot's maximum supported screw position simply won't have anywhere to be secured, even if the connector itself would accept it electrically.
Keying: the notch that determines what a slot can accept
Separate from length, M.2 connectors use a keying system — a notch cut into specific positions along the connector's edge — to physically prevent incompatible drive and slot combinations from being inserted. The two keying positions relevant to consumer SSDs are B-key and M-key, referring to which specific pins are present at the notch location. An M.2 slot that only physically accepts an M-keyed drive has its connector cut to match only that key position; a B+M keyed drive (notched at both positions) is more broadly compatible because it can insert into slots designed for either key type, though the electrical capability it actually gets to use is determined by what the slot supports, not just whether it fits.
Nearly all NVMe SSDs sold today for desktop and laptop use are M-keyed (or B+M keyed), because M-key is the position that enables the full four-lane PCIe connection NVMe drives need for their rated speeds. B-key-only slots, which are less common in current consumer hardware but do appear on some specific implementations, are limited to a maximum of two PCIe lanes or SATA signaling, meaning an NVMe drive requiring the full four-lane interface either won't fit a B-key-only slot at all, or if it happens to fit due to a B+M notch, will be artificially capped well below its rated speed by the reduced lane count that slot actually wires up.
SATA vs NVMe M.2 drives look identical but aren't interchangeable
Adding to the confusion, M.2 SATA SSDs and M.2 NVMe SSDs can share the same physical connector and key type, making them visually indistinguishable at a glance despite using entirely different protocols — M.2 SATA drives communicate using the same AHCI/SATA protocol as a 2.5-inch SATA SSD, just over the M.2 physical connector instead of a SATA cable, capped at the same roughly 550 MB/s ceiling covered in how SATA and NVMe SSDs actually differ in real-world speed, while M.2 NVMe drives use the PCIe-based NVMe protocol entirely. Some motherboard M.2 slots support only one protocol type despite physically accepting either drive, meaning a drive can seat perfectly and still fail to be recognized correctly, or run capped at SATA speeds, if the slot and drive protocol don't match. Checking the motherboard manual's specific M.2 slot documentation for both supported key type and supported protocol (not just "M.2 slot present") is the only reliable way to confirm compatibility before purchase.
Why this matters more on laptops and small form factor builds
Desktop motherboards overwhelmingly standardize on 2280 M-key NVMe slots, making compatibility mostly a non-issue for typical desktop upgrades. Laptops and handhelds are where form factor mismatches actually bite buyers: a laptop originally shipping with a 2230-length drive won't accept a longer 2280 drive without a specific length-adapter bracket if the chassis has room at all, and some ultra-compact systems use non-standard mounting that further restricts which physical drive sizes will actually secure inside the case even when the connector itself would accept a longer drive electrically.