Method 1: Solana CLI (Command Line)
The Solana CLI includes the spl-token tool which can close token accounts directly. This is the most powerful free method.
Install the Solana CLI
If you don't already have it, install the Solana tool suite:
sh -c "$(curl -sSfL https://release.anza.xyz/stable/install)"
List your empty token accounts
spl-token accounts --owner YOUR_WALLET_ADDRESS
This shows all token accounts associated with your wallet, including their balances. Look for accounts with a balance of 0.
Close empty accounts one by one
spl-token close ACCOUNT_ADDRESS
This closes the specified token account and returns the ~0.00203 SOL rent deposit to your wallet.
Close all empty accounts at once
spl-token close --owner YOUR_WALLET_ADDRESS --all
This closes all empty token accounts in one step. Only accounts with a zero token balance will be closed — accounts holding tokens are never affected.
Cost: Free. You only pay the standard Solana network transaction fee (~0.000005 SOL per signature), which is a fraction of a cent.
Method 2: Phantom Wallet
Phantom, the most popular Solana wallet, has a built-in feature for closing empty token accounts.
- Open Phantom wallet
- Go to Settings (gear icon)
- Scroll to Account Management or look for Close Empty Accounts
- Review the list of empty accounts Phantom found
- Confirm to close them and recover your SOL
The exact location of this feature may vary by Phantom version. If you can't find it, check Phantom's help docs or try the CLI method above.
Cost: Free. Only the minimal Solana network fee applies.
Method 3: Solana Explorer
You can also close token accounts through Solana Explorer:
- Go to explorer.solana.com
- Search for your wallet address
- Navigate to the Tokens tab
- Find token accounts with zero balance
- Some explorer interfaces allow closing accounts directly — connect your wallet and follow the prompts
Cost: Free. Only the minimal Solana network fee applies.
When Paid Tools Make Sense
The free methods above work perfectly. Paid recovery tools exist for convenience:
- Speed — they scan your wallet instantly and batch all closures into optimised transactions
- Simplicity — one click, no command line knowledge needed
- Thoroughness — they find accounts across both SPL Token and Token-2022 programs automatically
If you have a handful of accounts to close, the free DIY method is straightforward. If you have hundreds of accounts across multiple wallets, a paid tool saves real time. Fees range from 1.9% to 20% depending on the tool — see our fee comparison for details.
The choice is yours. We believe you should know the free option exists before deciding.
Want the Full Technical Guide?
For a complete walkthrough covering RPC configuration, Token-2022 accounts, hardware wallet support, transaction verification, troubleshooting, and a detailed cost analysis, read our full CLI recovery guide.