Skip to content
SOLTidy

What is a Solana token account? How it works, explained

A Solana token account is a 165-byte account that holds one token for one owner. How its address is derived, why it costs rent, and why it stays after you sell.

Cover image for What is a Solana token account? How it works, explained
By Updated 8 min read 1641 words

Key takeaways

  • A Solana token account is an on-chain account, owned by the SPL Token or Token-2022 program, that records one owner's balance of one token mint.
  • A standard SPL token account is 165 bytes and stores the mint, the owner, the token amount, an optional delegate, its state, a wrapped SOL flag and an optional close authority.
  • A Solana associated token account's address is derived from three inputs, the wallet address, the token program ID and the mint address, so every wallet has exactly one predictable address per token.
  • Every Solana token account holds a refundable rent deposit, 0.00148844 SOL for a standard SPL token account opened today or 0.00203928 SOL for one opened before Solana lowered rent.
  • Selling or sending away a token sets its Solana token account's balance to zero but does not close the account, so the account and its rent remain until the owner closes it.

The short answer

A Solana token account is a separate on-chain account that holds your balance of one token. Your SOL lives in your wallet account, but every other token, from USDC to a memecoin to an NFT, lives in its own token account owned by your wallet. A standard one is 165 bytes and holds a refundable rent deposit of 0.00148844 SOL, or 0.00203928 SOL if it was opened before Solana lowered rent. It stays open after you sell until you close it.

What is a token account on Solana?

A token account is an account owned by a token program that records how much of one token one owner holds. Solana stores state in accounts, and the SPL Token program keeps balances outside your wallet account: each pair of owner and token mint gets its own account. Token-2022, the newer token program, uses the same design with optional extensions.

The 165 bytes of a standard SPL token account hold these fields:

FieldSizeWhat it records
Mint32 bytesWhich token this account holds
Owner32 bytesThe wallet allowed to move the tokens and close the account
Amount8 bytesThe balance, in the token's smallest units
Delegate36 bytesAn optional address approved to move some of the balance
State1 byteUninitialized, initialized or frozen
Is native12 bytesWhether this is a wrapped SOL account, and its rent reserve
Delegated amount8 bytesHow much the delegate may move
Close authority36 bytesAn optional address allowed to close the account instead of the owner

There are two kinds of "owner" here, and they are easy to mix up. At the runtime level the account is owned by the token program, which is the only program allowed to change its data. Inside the data, the owner field names your wallet, which is the address whose signature the token program requires. When people say "your token account", they mean the second.

A few fields explain common surprises. A delegate is how token approvals work on Solana, and the free Revoke Delegations scan lists any you have. The frozen state is what a token's freeze authority sets, after which you cannot move or burn the balance. And the close authority, when set to someone else, means only that address can close the account.

How is an associated token account address derived?

An associated token account (ATA) address is derived from three inputs: your wallet address, the token program ID and the token's mint address. The Associated Token Account program turns those into a program derived address, a deterministic address with no private key. The same three inputs always give the same address.

That design solves a real problem. Without it, a sender would need to ask you which of your token accounts to use. With it:

  1. A sender's wallet computes your ATA for the token from your wallet address alone.
  2. If the account does not exist yet, the sending transaction creates it, and the sender pays the rent.
  3. The tokens go into that account, which you own.

Swaps follow the same pattern: Jupiter and other interfaces add a create-ATA instruction when you buy a token for the first time, and your wallet pays the deposit. Because the address is derived, closing an ATA and receiving the token later recreates it at exactly the same address.

The token program is part of the derivation, so the same wallet and mint would give different addresses under SPL Token and Token-2022. In practice that rarely matters, because each mint belongs to one program. Wallets can also hold non-associated token accounts, created at arbitrary addresses by some programs and bots, and these work the same way.

Why does every token need its own account?

Every token needs its own account because Solana's runtime processes transactions in parallel by knowing in advance which accounts each one writes. Keeping each balance in a separate account means a transfer of token A and a transfer of token B from the same wallet do not touch the same data. It also keeps the wallet account small and lets the token program, rather than your wallet, enforce the rules for each token.

The cost of that design is the account count. A wallet that has touched 200 different tokens has about 200 token accounts, each holding its own deposit. A wallet that has traded only SOL and USDC, however heavily, has one or two, because repeat purchases reuse the existing account. The hidden cost of everyday Solana activity goes through where those accounts come from: swaps, airdrop claims, NFT mints and memecoin trading.

How many token accounts does a typical trader have?

There is no meaningful average, because the count follows the number of different tokens a wallet has touched, not its age or trading volume. The only data I have is small and self-selected: across 67 wallets that cleaned up with SOLTidy, the median wallet closed 2 accounts, the mean was 12.3 and the largest closed 178. That spread is why I would distrust a single "typical" figure. What the mechanics predict:

Wallet profileRoughly how many token accounts
Holds SOL, trades only USDC1 or 2
Occasional swaps into a few DeFi tokensa handful to a couple of dozen
Claims airdrops and farms points across protocolsdozens, one per receipt or reward token
Trades memecoins, especially through botsone per coin ever bought, often hundreds

Each of those accounts is 0.00148844 or 0.00203928 SOL, so 100 empty ones hold roughly 0.15 to 0.2 SOL.

Why does a token account cost SOL?

A token account costs SOL because every Solana account must hold a rent-exempt deposit sized by its data. The formula is (128 + data bytes) x 5,080 lamports today, and it was 6,960 lamports per byte before Solana lowered rent. For token accounts:

  • SPL token account, 165 bytes: 0.00148844 SOL new, 0.00203928 SOL if opened before the change.
  • Token-2022 associated token account, typically 170 bytes: 0.00151384 SOL new, 0.00207408 SOL if older. Extensions on the mint make it larger.
  • Wrapped SOL account, 165 bytes: the same deposit, plus whatever SOL is wrapped inside.

The deposit belongs to the account, so it comes back in full when the account is closed. Rent itself is covered in what Solana rent is, other account types are in the rent-exempt minimum by account type table, and the free Solana rent calculator gives the deposit for any size. Accounts opened at the old rate hold more than they now need; getting SOL back without closing token accounts explains how to withdraw that surplus.

Why does a token account stay after you sell?

A token account stays after you sell because selling only moves tokens; it never closes the account. Closing is a separate CloseAccount instruction that the owner must sign, and swap interfaces do not add it, since the account is the default place for that token to arrive and you might buy again. The result:

  • The balance goes to zero, and most wallets hide the token.
  • The account, and its 0.0015 to 0.002 SOL deposit, remains on chain.
  • If a sale left a tiny remainder, the account is not even empty, and it cannot be closed until the dust is sold or burned.

Nothing on Solana closes these accounts automatically. That is why active wallets carry dozens or hundreds of them.

How do you see your token accounts?

You see all your token accounts with a block explorer or a command line, not with a wallet's token list. Wallets are built to show what you hold, so zero-balance accounts drop out. Ways to get the full list:

  1. A block explorer. Open your wallet address and use its token accounts view, which lists empty accounts too.
  2. The spl-token CLI. spl-token accounts lists the token accounts your keypair owns. In current versions it queries both SPL Token and Token-2022 unless you restrict it with --program-id or --program-2022, and --verbose adds each account's address.
  3. The RPC. getTokenAccountsByOwner returns them for one token program per call, so query both SPL Token and Token-2022.
  4. A closing tool's scan. Connecting a wallet to the SOLTidy Token Account Closer scans both programs at once and shows the SOL each closable account would return. Scanning signs nothing.

How do you close a token account?

You close a token account by emptying it and sending a CloseAccount instruction signed by its owner, which returns every lamport in it to an address you choose. The steps and options:

  1. Empty it. Sell or send the balance, or burn it if it is worthless. Sell Dust for SOL swaps small balances through Jupiter and closes the account in the same transaction.
  2. Close it. Use a wallet's close option where one exists, spl-token close or spl-token gc from the CLI for network fees only (the CLI guide has the flags), or a batch tool.
  3. Check the edge cases. Frozen accounts, a close authority set to someone else, and Token-2022 withheld transfer fees all block a close; why a Solana token account won't close covers each error, and closing Token-2022 accounts covers that program's specifics.

For many accounts at once, the Token Account Closer preselects empty SPL and Token-2022 accounts, packs up to 12 items per transaction, simulates each batch before you sign, and charges 5% of the rent recovered, nothing if nothing is recovered. I built it because closing two hundred accounts one menu at a time is not something anyone does twice.

Bottom line

A Solana token account is a small, separate account that holds one token for one owner, at an address derived from the wallet, the token program and the mint. It exists because Solana keeps every balance in its own account, it costs a refundable deposit of 0.00148844 or 0.00203928 SOL, and it stays open after the tokens are gone. Knowing that turns "where did my SOL go" into a list of accounts you can count, check and close, and a Solana wallet cleanup reclaims SOL from them along with the other places it hides.

Questions & answers

What is the difference between a wallet address and a token account?

A wallet address is a system account that holds SOL and signs transactions. A token account is a separate account that holds one token for that wallet. When someone sends you USDC, the tokens land in your USDC token account, not in the wallet account itself. Wallet apps hide this by showing all your token accounts as one list under your wallet address.

What is an associated token account (ATA)?

An associated token account is the token account at the default address for a given wallet and token. The address is derived from the wallet address, the token program ID and the mint address, so anyone can compute it without asking. Wallets, DEXs and airdrop tools send tokens to this address, which is why you normally have exactly one token account per token.

Why does a token account cost SOL to open?

Every Solana account must hold a rent-exempt deposit proportional to its size, and a standard token account is 165 bytes. The deposit is (128 + 165) x 5,080 lamports, which is 0.00148844 SOL today; accounts opened before Solana lowered rent hold 0.00203928 SOL. It is a deposit, not a fee, and it comes back in full when the account is closed.

Why are my token accounts still there after I sold everything?

Because selling only moves the tokens out. The token program does not know whether you will receive that token again, and closing an account requires your signature, so the empty account stays open with its rent deposit inside. Most wallets hide zero-balance tokens, so you do not see it, but it remains on chain until you close it.

Can I have more than one token account for the same token?

Yes, but it is unusual. Your wallet has one associated token account per mint, and that is where tokens normally arrive. Any program or user can also create additional, non-associated token accounts for the same mint and owner. They work the same way and hold the same rent; the spl-token gc command and closing tools treat them like any other account.

How do I see all my token accounts, including empty ones?

Use a block explorer's token accounts view for your wallet address, which lists every token account including zero-balance ones. From a terminal, spl-token accounts lists them for your keypair, and developers can call the getTokenAccountsByOwner RPC method once for SPL Token and once for Token-2022. Wallet token lists are not reliable for this, because they hide empty accounts.