How to close a Solana token account and recover your rent (2026 guide)

Published 2026-09-28 · 8 min read

How to close a Solana token account and recover your rent (2026 guide)

If you've traded SPL tokens on Solana for more than a few months, you probably have dozens (or hundreds) of empty Associated Token Accounts (ATAs) locked into your wallet, each holding 0.00203928 SOL as rent-exempt deposit. This guide walks through every practical way to close them and get that SOL back.

Prerequisites: understanding what you're closing

An SPL token account holds: - A token balance (how many of that specific mint you own) - A rent-exempt deposit (0.00203928 SOL for a legacy Token account) - Ownership metadata

The closeAccount instruction only works when the token balance is exactly zero. If you have non-zero balance, you must either: - Transfer the remaining tokens elsewhere - Or burn them (if worthless)

Once balance is 0, closeAccount returns the rent deposit to a destination address of your choice (usually your main wallet) and marks the account as closed. The account can be re-opened later if you buy that token again, at the cost of a fresh 0.00203928 SOL deposit.

Method 1: The CLI (solana-cli / spl-token)

If you're comfortable with the Solana CLI, this is the direct route.

Install

# Solana CLI
sh -c "$(curl -sSfL https://release.solana.com/stable/install)"

# spl-token CLI
cargo install spl-token-cli

Find your empty ATAs

# List all token accounts owned by your wallet
solana-keygen pubkey  # your wallet address
spl-token accounts --owner <YOUR_WALLET>

The output lists every ATA, its mint, and its balance. Identify the ones with balance 0.

Close one account

spl-token close-account \
  --address <ATA_ADDRESS_TO_CLOSE> \
  --recipient <YOUR_WALLET>

If the account holds tokens, this fails. Transfer or burn first:

# burn any remaining tokens
spl-token burn <ATA_ADDRESS> <AMOUNT>

# then close
spl-token close-account --address <ATA_ADDRESS>

Close many at once (bash loop)

# get a list of your empty ATA addresses
spl-token accounts --owner <YOUR_WALLET> --output json \
  | jq -r '.accounts[] | select(.tokenAmount.uiAmount == 0) | .address' \
  > empty_atas.txt

# close them one by one
while read ATA; do
  spl-token close-account --address "$ATA"
done < empty_atas.txt

Pros: free, no third-party, full control Cons: requires CLI setup, one transaction per close, tedious for 100+ accounts

Method 2: jup.ag/close (Jupiter)

Jupiter's built-in cleanup tool at jup.ag/close.

Steps

  1. Connect your wallet at jup.ag
  2. Navigate to jup.ag/close (or find "Close accounts" in the wallet menu)
  3. The page auto-scans for empty accounts
  4. Select which ones to close (or "Select all")
  5. Click "Close" and sign the transaction in your wallet

Pros: free, familiar Jupiter UI, non-custodial Cons: single-wallet only, manual per-item selection, no automatic batching across multiple wallets

Method 3: sol-incinerator.com

Sol Incinerator was originally built to burn worthless tokens; it added account closing as a follow-up feature.

Steps

  1. Connect wallet
  2. Auto-scans for tokens
  3. Select accounts to close
  4. Sign the transaction

Pros: free, non-custodial, dedicated tool Cons: dated UI, primary focus is token burning not rent recovery, single-wallet

Method 4: SolDuster (multi-wallet batch)

SolDuster was built specifically to solve the multi-wallet problem — most traders have 5-20 sub-wallets (main, snipers, cold, degen), and running the cleanup tool 20 times is friction.

Steps

  1. Open solduster.com
  2. Connect your first wallet — auto-scan runs (no signature required)
  3. Optionally connect up to 4 more wallets (multi-wallet flow)
  4. Review the total SOL recoverable across all wallets
  5. Click "Recover" — each wallet signs its own batched closeAccount transaction (typically 12 closes per tx, so a wallet with 40 empty ATAs signs 4 batches at once via signAllTransactions)
  6. SOL returns to each original wallet in the same block

Under the hood

The frontend uses @solana/web3.js and @solana/spl-token:

import { createCloseAccountInstruction, TOKEN_PROGRAM_ID } from '@solana/spl-token';

// build batched close instructions
const closeIxs = emptyAtas.map(ata =>
  createCloseAccountInstruction(ata, wallet, wallet)
);

// group into 12-close chunks to fit in 1232-byte tx limit
const chunks = chunk(closeIxs, 12);
const transactions = chunks.map(ixs => new Transaction().add(...ixs));

// sign all in one wallet prompt
const signed = await wallet.signAllTransactions(transactions);

// broadcast
for (const tx of signed) {
  await connection.sendRawTransaction(tx.serialize());
}

Pros: multi-wallet batching (up to 5), Token-2022 support, one signature prompt per wallet for all its closes, non-custodial Cons: requires trusting the frontend (source code auditability is on the roadmap)

Comparing the methods

Method Multi-wallet Batch signing Token-2022 Cost
CLI Manual No (1 tx per close) Yes (specify program) Free
jup.ag/close Single Yes (batched) Yes Free
sol-incinerator Single Yes Yes Free
SolDuster 5 wallets in one flow Yes Yes Free scan, ~$0.001 gas

Common pitfalls

"Transaction too large" error Solana caps transactions at 1232 bytes. Each closeAccount instruction takes ~40 bytes. Keep batches under 12 closes per transaction.

"Account not empty" Balance must be exactly 0. Some memecoin contracts inject dust into your ATA specifically to prevent closing. Burn the dust first with spl-token burn <address> <amount>.

"Insufficient funds" You need a tiny amount of SOL for transaction fees (~5000 lamports = $0.001). Fund your wallet first.

Account gets reopened after closing Some token launches auto-airdrop dust to previous holders, reopening your ATA. There's nothing to do about this — just close it again periodically.

Wallet doesn't show the returned SOL Some wallets cache balances. Refresh, or check the actual balance on Solscan.

How much can you actually recover?

Free way to check: paste your wallet address into SolDuster — no wallet connection needed for the estimate.

FAQ

Do I lose the tokens if I close the account? No. Balance must already be 0 when you close. Close only affects the ATA itself, not any tokens (there are none if balance is 0).

Can I close accounts for tokens I still hold? No. Sell or transfer the tokens first, then close.

Is closing an account reversible? Semi. The account is closed on-chain and its state is gone, but if you receive the same token again in the future, a new ATA is opened for it (costing another 0.00203928 SOL deposit).

Are there any risks? The closeAccount operation itself is straightforward Solana runtime behavior — no smart contract risk. The only risks come from the tool used: if a tool has malicious code that swaps closeAccount for a transfer to a foreign address, you'd lose funds. This is why non-custodial tools with signature review (visible destination in your wallet UI) matter.

Should I close all my ATAs at once? You can, but consider keeping ATAs for tokens you actively trade — you'll just re-pay the 0.00204 SOL deposit next time you buy that token.

Bottom line

The math is simple: every empty token account = ~0.002 SOL locked. Multiply by however many you've accumulated. Close them in one signed transaction using the tool that fits your workflow.

If you want to run a free scan across up to 5 wallets in one flow: solduster.com.


Have questions about closing accounts or rent mechanics? Reach out on X at @SoldusterHQ.


Scan your wallet on solduster.com →