Solana IDL reference › Solana token account and mint layout

Solana token account and mint layout

SPL Token and Token-2022 store accounts in a fixed, hand-written layout (not Borsh, no discriminator). The base layout is the same in both programs.

Token account (165 bytes)

FieldTypeOffsetSize
mintpubkey032
ownerpubkey3232
amountu64648
delegateCOption<pubkey>7236
stateAccountState1081
is_nativeCOption<u64>10912
delegated_amountu641218
close_authorityCOption<pubkey>12936

COption<T> is a 4-byte little-endian tag (0 = none, 1 = some) followed by T, and always takes the full size. state is 0 uninitialized, 1 initialized, 2 frozen. Token account page with filters.

Mint (82 bytes)

FieldTypeOffsetSize
mint_authorityCOption<pubkey>036
supplyu64368
decimalsu8441
is_initializedbool451
freeze_authorityCOption<pubkey>4636

Mint page.

Multisig (355 bytes)

m (required signers), n (valid signers), is_initialized, then 11 signer public keys.

Token-2022 extensions

A Token-2022 account or mint with extensions keeps the base layout, then a 1-byte account type at offset 165 (1 = mint, 2 = token account). Mints are zero-padded from byte 82 to 165 first. After the type byte come TLV entries: a 2-byte little-endian extension type, a 2-byte length, then the value. The decoder lists which extensions are present. To check what a Token-2022 mint's extensions mean for a holder, use the Rugsight token check.

Finding a wallet's token accounts

Filter the token program's accounts with dataSize: 165 and a memcmp on owner at offset 32 (or mint at offset 0). Most RPCs also offer getTokenAccountsByOwner, which does this for you.

All programs in the IDL reference · Explain a transaction

Data: solana-idls@1.2.1 (MIT, © Obsidian Protocol) and SPL Token / Token-2022 state layouts (Apache-2.0), snapshot 2026-11-17. Programs can upgrade and an IDL snapshot can lag the deployed program, so check important offsets against current account data.