How to close empty token accounts on Solana and get your SOL back

Every token you have ever held on Solana created a token account in your wallet. Each one holds a rent-exempt deposit of about 0.00204 SOL. When the token balance drops to zero, the account (and the deposit) stays behind. Closing it returns the SOL to you. A wallet that has traded 100 memecoins can have 0.2 SOL locked this way.

What is safe to close

Method 1: your wallet (free)

Phantom and Solflare both have a built-in cleanup for unused token accounts; the menu wording changes between versions, so look under settings for "close token accounts" or "unused accounts". This is free apart from the network fee.

Method 2: the command line (free, for developers)

spl-token accounts            # list balances
spl-token close --address <TOKEN_ACCOUNT>
spl-token gc                  # cleans up non-associated (ancillary) accounts

To find empty accounts by RPC, call getTokenAccountsByOwner for both the Token program (Tokenkeg…) and Token-2022 (Tokenz…) and keep rows where tokenAmount.amount == "0". Batch around 10–20 closes per transaction because of the size limit.

Method 3: a web tool

Web tools save time when you have dozens of accounts. They charge a fee, so compare: check that the fee is shown inside the transaction preview before you sign.

Check how much SOL you have locked, for free: SolReclaim scan is read-only and needs no wallet connection. If you then close through it, the fee is 5%, shown as a separate line in the transaction. Using your wallet's built-in cleanup is free and works just as well.

FAQ

Can I close an account that still has dust? Not until it is zero: burn or send the dust first.
Can a frozen account be closed? Yes, if its balance is zero (some tools skip them, including ours, to stay conservative).
Who gets the SOL? Whatever destination the owner signs for, normally your own wallet.

Updated 3 Nov 2026. Informational only, not financial or tax advice.