How-to · Solana · rent
Close empty token accounts.
Get the rent back.
Every SPL token account is a rent-exempt account (~0.002 SOL). If the balance is zero, you can close it and the rent returns to the owner. Do this in a wallet you control. Never paste a seed into a website.
The recipe
Find empties. Then close.
-
01
List token accounts
getTokenAccountsByOwneron the Token program and Token-2022. Empty meanstokenAmount.amountis0. Those rows still havelamports. -
02
Close in a wallet
Phantom: Settings → Manage accounts / Close token accounts (wording moves). Solflare has a similar unused-account closer. You sign. The site should never see your key.
-
03
Or the CLI
spl-token accountsthenspl-token close <token-account>for each empty ATA. Destination for rent is the owner wallet.
curl https://api.mainnet-beta.solana.com -H 'content-type: application/json' -d '{
"jsonrpc":"2.0","id":1,"method":"getTokenAccountsByOwner",
"params":["ADDRESS",{"programId":"TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA"},{"encoding":"jsonParsed"}]
}'
Do not close accounts you still need. Some apps recreate ATAs and you pay rent again. Frozen or delegated accounts may refuse close.
Without a script
Preview in the browser.
Reclaim runs the scan in your tab and shows empty count plus reclaimable SOL. The CSV of every empty ATA is 8 USDC on Solana, matched on-chain. No email, no seed.
Also on Hashnode: Close empty Solana token accounts and reclaim rent.