Close old Solana token accounts and get your SOL back
Every token you have ever held on Solana left a small token account behind, and every one of those accounts is holding a refundable deposit of your SOL. Empty them, close them, and the SOL comes back. This guide shows how, safely, without handing anyone your keys.
Why your SOL is stuck
Solana stores every token balance in its own token account. Creating one costs a rent-exempt deposit: enough SOL to pay for the account's storage forever. A standard token account is 165 bytes, so its deposit is (165 + 128) × 3,480 × 2 = 2,039,280 lamports = 0.00203928 SOL.
That deposit is not a fee. It is yours, and it sits in the account until the account is closed. Selling or sending away all of a token does not close its account: you are left with an empty account still holding your deposit. Airdrops, swaps, meme coins and spam tokens each add another one. Wallets that have traded for a while often have dozens.
Step 1 — Count your token accounts
Open your wallet address in any Solana block explorer and look at its token holdings. Include empty ones and both token programs: the original SPL Token program and the newer Token-2022 (token extensions) program. Multiply the number of accounts by 0.00203928 to see roughly how much SOL you can recover.
With the command-line tools (read-only, no key needed to list):
spl-token accounts --owner <YOUR_WALLET_ADDRESS>
spl-token accounts --owner <YOUR_WALLET_ADDRESS> --program-2022
Step 2 — Decide what happens to each token
An account can only be closed when its balance is exactly zero. For every account that still holds something, pick one:
| The token is… | Do this | Result |
|---|---|---|
| Something you want to keep | Move it to your main wallet (see consolidating wallets) | You keep the token; the old account closes |
| Worth something you'd rather have as SOL | Sell / swap it in your wallet | SOL in, then the empty account can close |
| Worthless (no price, no market, spam) | Burn it | Token destroyed permanently, account can close |
| An NFT you care about | Leave it, or move it | Burning an NFT destroys it — never burn to save 0.002 SOL |
Burning is permanent. Only burn what you have checked is worthless, and check again for tokens whose price you don't know.
Step 3 — Close the empty accounts
Option A: your wallet app
Some wallet apps include a "burn" or "close empty accounts" option for tokens. If yours does, use it. Before approving, read the transaction preview: it should only contain Close Account (and, if you chose it, Burn) instructions, and the SOL should flow to you. If the preview shows SOL or tokens leaving to an address you don't recognise, reject it.
Option B: the official command-line tools
The spl-token CLI is maintained alongside the token programs themselves. Install the Solana CLI from the official docs, point it at mainnet and your keypair, then:
# close every EMPTY associated token account in one go (SOL comes back to you)
spl-token gc --close-empty-associated-accounts
spl-token gc --close-empty-associated-accounts --program-2022
# or close a single account, sending the deposit wherever you want
spl-token close --address <TOKEN_ACCOUNT> --recipient <WHERE_THE_SOL_GOES>
# burn a worthless balance first, then close
spl-token burn <TOKEN_ACCOUNT> ALL
spl-token close --address <TOKEN_ACCOUNT>
Run spl-token accounts again afterwards: the closed accounts are gone, and your SOL balance is up by about 0.002 SOL for each.
Option C: a third-party "rent reclaim" site
These exist and some are fine, but most take a percentage of what you recover, and fake ones are a common way wallets get drained. If you use one, use it only through your wallet's normal connect-and-approve flow, never type a seed phrase, and read every transaction preview as described above.
Consolidating several wallets into one
If your tokens are spread over many wallets, you can gather them into one main wallet and close the leftovers. For each token:
- Create the token's account in the main wallet (wallets do this automatically when you send).
- Send the full balance there.
- Close the now-empty account in the old wallet, with the deposit going to the main wallet.
Steps 1 and 3 cancel out: the new account's deposit is paid by the old account's refund, so moving a token costs only the network fee. Where several wallets hold the same token, they merge into one account in the main wallet, and every duplicate deposit comes back as free SOL. Empty accounts just close, and their deposits come back directly. Finally, send each old wallet's leftover SOL to the main wallet.
Accounts you can't close (yet)
- Non-zero balance. Even 0.000001 of a token blocks the close. Move, sell or burn the dust first.
- Frozen accounts. The token's freeze authority has locked it; locked ("programmable") NFTs work this way. Leave them.
- Token-2022 accounts holding withheld transfer fees. Some Token-2022 tokens take a fee on every transfer, and it sits in the receiving account until it is harvested. The account can't close until it is.
- Accounts you don't own. Only the account's owner (or its close authority) can close it.
Questions
How much SOL does a token account hold?
A standard SPL token account holds 0.00203928 SOL. Token-2022 accounts with extensions are slightly larger and hold slightly more. Fifty old accounts is about 0.1 SOL.
Does closing an account lose my tokens?
No. A close only succeeds on an empty account. Burning is what destroys tokens, and you choose what to burn.
What does it cost?
The network fee: 0.000005 SOL per signature. Many closes fit in one transaction, so recovering 50 deposits costs a tiny fraction of what comes back.
Will the account come back if I receive that token again?
Yes. A new token account is created (and a new deposit paid by the sender or you) whenever that token arrives again. Close it again later if you need to.
Do I need to give a site my seed phrase?
Never. Signing close-account transactions in your own wallet is all it takes.
More from solchain
Build a Solana trading bot — a copy-paste guide to a token-agnostic grid / mean-reversion bot.