exFAT (Extensible File Allocation Table)

exFAT is Microsoft’s FAT successor for flash media, with 64-bit file sizes and an allocation bitmap. It is the default format for SDXC cards and many USB drives and external SSDs, and is read by Windows, macOS, Linux, cameras and consoles. It has no journal, so unclean removal commonly leaves damaged volumes.

Overview

exFAT keeps FAT’s cluster-chain idea but adds an allocation bitmap, an up-case table, 64-bit file sizes and a directory made of typed 32-byte entries grouped into entry sets (file, stream extension, name). Files can be flagged contiguous so the FAT is not consulted. Boot regions have a checksum sector.

History

  • Introduced in 2006 with Windows CE 6.0 and added to desktop Windows with Vista SP1 / XP SP2 updates.
  • Adopted as the SDXC card file system by the SD Association.
  • Microsoft published the specification in 2019 and a Linux in-kernel driver was merged in 5.7 (2020).

Structures

Offsets are in bytes from the start of the structure named in each heading. Field names are descriptive and are not an official specification. Fixed-width integers are shown as u/i (unsigned/signed) followed by bit width and byte order.

Ex Fat File System

OffsetSizeTypeFieldNotes
position + 11u8Characters
position + 11u8–
position + 204u32 LECluster
position + 248u64 LELength

Parse Entry Set

OffsetSizeTypeFieldNotes
position + 11u8Secondary Count
position + 22u16 LEStored
stream + 31u8Name Length

Parse Entry Set

OffsetSizeTypeFieldNotes
0x42u16 LE–
0x84u32 LE–
0xC4u32 LE–
0x104u32 LE–
0x141u8–
0x151u8–
0x161u8–
0x171u8–
0x181u8–

Parse Entry Set

OffsetSizeTypeFieldNotes
0x11u8–
0x88u64 LE–
0x144u32 LE–
0x188u64 LE–

Has Fat Signature

OffsetSizeTypeFieldNotes
0x04u32 LE–
0x44u32 LE–

Try Parse

OffsetSizeTypeFieldNotes
0x38bytes–
0xB53bytes–
0x488u64 LEVolume Length
0x504u32 LEFat Offset
0x544u32 LEFat Length
0x584u32 LEHeap Offset
0x5C4u32 LECluster Count
0x604u32 LERoot
0x644u32 LESerial Number
0x682u16 LERevision
0x6A2u16 LEVolume Flags
0x6C1u8Bytes Shift
0x6D1u8Cluster Shift
0x6E1u8Fats
0x701u8Percent In Use

Other fields read

Read inOffsetSizeTypeFieldNotes
Follow Fat0x04u32 LENext

Constants

Ex Fat File System

NameValueTypeNotes
RootId1ulong

Ex Fat Boot Sector

NameValueTypeNotes
BackupBootSector12int

Ex Fat Const

NameValueTypeNotes
EntrySize32int
EndOfDirectory0x00byte
AllocationBitmap0x81byte
UpcaseTable0x82byte
VolumeLabel0x83byte
File0x85byte
StreamExtension0xC0byte
FileName0xC1byte
InUseBit0x80byte
AttrReadOnly0x01ushort
AttrHidden0x02ushort
AttrSystem0x04ushort
AttrDirectory0x10ushort
AttrArchive0x20ushort
FlagNoFatChain0x02byte
FatBad0xFFFFFFF7uint
FatEnd0xFFFFFFFFuint
NameCharsPerEntry15int

Implementation limits

ClassNameValueNotes
Ex Fat File SystemMaxDirectoryBytes256L * 1024 * 1024
Ex Fat File SystemMaxBitmapBytes512L * 1024 * 1024

Signatures and magic strings referenced

TextWhere checked
EXFAT Try Parse
Structures and constants were extracted from the implementation. Prose sections are a summary from public sources; verify details before relying on them.