Skip to content

How to close empty token accounts on Solana

Short answer: An empty token account is one with a zero token balance. Closing it is a single CloseAccount instruction signed by the owner, and its rent deposit (2,039,280 lamports, about 0.00204 SOL, for accounts created before September 2026; 1,488,440 lamports for newer ones) goes to the address you choose, normally your wallet. SolRent batches about 20 closes per transaction.

Steps

  1. Find the empty accounts. SolRent lists every zero-balance account across the SPL Token and Token-2022 programs.
  2. Batch them. Closes are packed ~20 per transaction to keep network fees tiny.
  3. Sign once per batch. Approve each batch in your wallet; rent returns immediately.

Why wallets leave them behind

Most wallets and trading bots open a token account when you buy and never close it when you sell, because closing costs a separate instruction. Over months, hundreds pile up.

Closing in bulk

A Solana transaction is limited to 1,232 bytes. Each close adds one account key and a small instruction, so roughly 20 fit in one transaction alongside the fee transfers. SolRent measures the real serialized size and splits automatically.

Do I lose anything?

No. An empty account holds no tokens. If you trade that token again, a new account is created automatically.

What "closing" actually does

A token account stores three main things: which token it is for (the mint), who owns it, and how many tokens it holds. The CloseAccount instruction deletes that record and sends its entire lamport balance, the rent deposit, to a destination the owner chooses. SolRent always sets the destination to your own wallet.

The token program enforces the safety rules itself:

  • The token balance must be exactly zero.
  • Only the owner, or a close authority the owner set, can sign the close.
  • Frozen accounts cannot be closed.
  • Token-2022 accounts with fees still withheld must have those fees harvested first. SolRent adds the harvest step automatically.

How much each close returns

A standard 165-byte account created before September 2026 returns 2,039,280 lamports (about 0.00204 SOL). One created after the rent change returns 1,488,440 lamports. Token-2022 accounts with extensions are larger and return more. Wrapped SOL accounts return their rent plus the wrapped SOL itself, as native SOL.

How many can I close at once?

A Solana transaction is capped at 1,232 bytes. SolRent measures each transaction's real size and fits about 20 closes per transaction, so a wallet with 300 empty accounts needs roughly 15 approvals. Most wallets let you approve a batch of transactions in one prompt. The base network fee is 5,000 lamports per signature, so even 15 transactions cost under 0.0001 SOL in network fees.

Burn vs close: which one gives SOL back?

Closing returns the rent deposit. Burning only destroys tokens: the account stays open and keeps its deposit. If an account still holds a worthless token, you need both steps, burn the balance and then close the account. Some wallet "burn" buttons do both; others only burn. Check that your SOL balance went up afterwards. See should you burn dead tokens.

Closing token accounts in Phantom or Solflare

Wallet apps are built around the tokens you hold, so cleanup in a wallet usually means opening one token at a time and choosing burn or close from its menu, where the wallet offers it. That is fine for a few accounts. Wallets don't always show empty accounts, Token-2022 accounts with withheld fees, or leftover wrapped SOL accounts, so a wallet can look clean while still holding rent. Pasting your address into a read-only scan shows what is left.

What a token-account cleaner does differently

  • Finds every zero-balance account across both the SPL Token and Token-2022 programs, including ones your wallet hides.
  • Harvests Token-2022 withheld fees first, so closes that would otherwise fail succeed.
  • Packs about 20 closes into each transaction and simulates each one before you sign.
  • Takes a fee from the recovered SOL. SolRent's is 12% (5% with Pro); compare tools in Sol Incinerator alternatives compared.

Closing accounts with a CLI

If you prefer the command line, spl-token accounts lists your accounts and spl-token close --address <account> closes one. Check that each balance is zero first. The CLI is fine for a handful of accounts; for hundreds, a batching tool saves a lot of time.

What not to close

Don't close accounts for tokens you are about to receive, such as a pending airdrop or vesting claim. The sender may expect the account to exist, and some programs won't recreate it. If in doubt, leave it; the deposit will still be there later.

Common questions

Can you close a token account that still has a balance?

No. The token program refuses to close an account unless its token balance is exactly zero. To close it you first have to sell, transfer or burn the tokens. Wrapped SOL is the exception: closing a wrapped SOL account unwraps it and returns the SOL with the rent.

Does closing token accounts affect my NFTs?

Not with SolRent: it never closes or burns NFT accounts. Closing an empty fungible-token account has no effect on any other account in your wallet.

Burn or close: which one gives SOL back?

Closing does. Burning only destroys tokens; the account and its rent stay. To get the rent back from an account that still holds worthless tokens you burn the balance first and then close the account, which SolRent does in one transaction.

How much does it cost to close token accounts?

The network charges 5,000 lamports per signature, and about 20 closes fit in one transaction, so network fees are a tiny fraction of the rent returned. SolRent adds a fee of 12% of the SOL recovered (5% with Pro); the CLI costs only network fees.

Last updated 29 October 2026.

Related guides

See how much SOL your wallet is hiding

Free, read-only scan. No wallet connection.

Scan your wallet