When closing a Solana (SOL) account, you can claim back the rent-exempt balance that was initially deposited to keep the account active. Here's what you need to know:
1. Rent-Exempt Balance (Minimum SOL Required)

Solana accounts require a small amount of SOL to remain active (to prevent spam).
The rent-exempt amount depends on the size of the account data:
For a basic wallet account (no data): 0.00203928 SOL (as of recent updates).
For accounts with data: The rent is calculated as:
Rent = (Account Size in Bytes) * (Rent per Byte-Year) / (Seconds per Year)
2. How Much You Can Claim Back
When closing an account, you get back the full rent-exempt balance.
Example:
If you created a wallet with 0.00203928 SOL as rent, you can reclaim 0.00203928 SOL when closing it.
If the account had data (e.g., an SPL token account), the reclaimable amount will be higher.
3. How to Close an Account & Claim SOL
You can close an account using:
Solana CLI (solana close-account <ADDRESS>)
JavaScript (web3.js):
const transaction = new Transaction().add(
SystemProgram.closeAccount({
fromPubkey: accountPubkey,
toPubkey: destinationPubkey, // Where to send the reclaimed SOL
programId: SystemProgram.programId,
}));await sendAndConfirmTransaction(connection, transaction, [signer]);Wallets/SDKs (e.g., Phantom, Solflare, Backpack).
4. Important Notes
Account must be empty (zero SOL balance or no data) before closing.
SPL Token Accounts must have a zero balance before closing.
Smart Contract Accounts may have additional rules.
Current Rent-Exempt Minimum (2024)
| Account Type | Approx. Rent-Exempt SOL |
|---|---|
| Basic Wallet | 0.00203928 SOL |
| SPL Token Account | ~0.00203928 SOL + data costs |
| Program Account | Varies (higher) |
