> For the complete documentation index, see [llms.txt](https://docs.j.tools/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.j.tools/tools/utilities/close-account.md).

# Close Token Accounts and Reclaim Rent SOL

Every [SPL or Token-2022](/concepts/spl-vs-token2022.md) account you have ever opened holds a rent deposit in SOL, exactly 0.00203928 SOL for a plain SPL account and more for a Token-2022 account that carries extensions, locked for as long as the account exists. [Close Token Account](https://j.tools/en/tools/close-account) scans a wallet, lists every account you can safely close, and closes them in batches so that rent comes back to you as SOL. It works on a single connected wallet, or on up to 1000 wallets at once when you paste private keys, and it can burn a tiny leftover balance and close the account in the same step.

## What it is

Close Token Account is a rent-reclaim utility. It finds the accounts you can close, shows the exact rent each one returns, and closes the ones you select.

It runs in two modes. **Wallet Scan** works on the connected wallet only. **Multi Wallet** scans and closes across many wallets whose private keys you paste, one per line. Accounts that still hold a small balance can be burned and closed together with **Burn & Close**, so a wallet full of dust accounts gets cleaned in a single pass.

## How it works (under the hood)

A Solana token account is a small on-chain record that tracks how much of one specific token a wallet holds. To stay alive on-chain it must hold a rent-exempt deposit, a fixed amount of SOL set aside when the account is created. That deposit is yours, just parked. An account can be closed once it is empty, and closing it releases the deposit back to your wallet as SOL. If you ever receive that token again, your wallet simply opens a new token account for it.

When you scan, the tool reads every SPL Token and Token-2022 account the wallet owns and lists each one with its balance and the rent you can reclaim. When you close, the app builds one close-account instruction per account and packs them into transactions of at most 10 accounts each, fewer when the rows are large, then asks you to sign. Fifty closable accounts means at least five signatures. Your wallet, or the imported owner keys, sign in the browser. The app broadcasts the signed transactions, confirms them with retry, and marks each row SUCCESS or FAILED.

For accounts that still hold a balance, **Burn & Close** adds a burn instruction first so the account becomes empty, then closes it. An account that is not empty cannot be closed, which is why the burn has to happen first.

The platform fee attaches on-chain inside the same close transaction and is only charged on successful closes.

<figure><img src="/files/rJoUulFKfbrMyxnjfIip" alt="How Close Account works"><figcaption></figcaption></figure>

## When to use it

* You trade tokens or memecoins and have piled up empty accounts that each lock roughly 0.002 SOL. Closing fifty of them returns about 0.1 SOL.
* You want to tidy a single connected wallet and pull its idle rent back into SOL.
* You manage a set of operational wallets and want to scan and close across all of them in one pass.
* An account has a small leftover balance you want gone, and you want to burn it and close the account together.
* You are winding down a wallet and want to release every account's rent before you stop using it.

## Before you start

* For **Wallet Scan** mode, a connected wallet ([how to connect](/getting-started/quick-start.md)). The reclaimed rent returns to it.
* For **Multi Wallet** mode, valid private keys, one per line, no duplicates, up to 1000.
* A connected wallet is also required when it pays gas or is set as the rent destination. A dedicated gas option needs a funded fee-payer key, and a custom rent destination needs a valid public address.
* Whoever pays the network fee needs some SOL. The "Each Wallet" gas option fails for a wallet that holds zero SOL.

{% hint style="warning" %}
**On pasting private keys.** Multi Wallet mode signs client-side with the keys you paste, and J Tools never stores or transmits them. Even so, treat this as sensitive. Use throwaway or operational wallets, not a wallet that holds funds you care about.
{% endhint %}

## Step by step

{% stepper %}
{% step %}

### Choose a mode

Pick **Wallet Scan** to work on the connected wallet only, or **Multi Wallet** to paste one private key per line. In Multi Wallet mode the terminal shows each line as valid, invalid, or duplicate, along with that wallet's SOL balance.
{% endstep %}

{% step %}

### Scan accounts

Click **Scan Accounts**. The tool reads every SPL Token and Token-2022 account the wallet owns and lists each one as a row with its mint, balance, and the rent you can reclaim. Token name, symbol, and logo are pulled in per mint. Large wallet sets are scanned in batches.
{% endstep %}

{% step %}

### Pick a close mode

**Only Empty** closes accounts with a zero balance. **Burn & Close** also burns any remaining balance first, then closes the account. Burn & Close asks you to confirm in a dialog before it burns anything.
{% endstep %}

{% step %}

### Set gas and rent routing (Multi Wallet only)

Choose **Gas Paid By** (Connected Wallet, Each Wallet, or Dedicated Wallet) and **Reclaimed Rent To** (Connected Wallet, Each Owner, or Custom Address). Add a fee-payer key or a custom address if the options you picked need one.
{% endstep %}

{% step %}

### Review the summary, filter, and select

The summary shows selected wallets, row counts, empty versus non-empty, closable accounts, selected rent, the platform fee, the estimated network fee, and success or failed counts. Empty accounts come pre-selected. Anything still holding a balance you must select on purpose. Use the filter box and the Closable Only / Selected Only toggles to narrow the list.
{% endstep %}

{% step %}

### Close selected accounts

Click **Close Selected Accounts**. The tool packs rows into transactions of at most 10 accounts each, signs them (the connected wallet signs first, imported owners sign as extra [signers](/getting-started/glossary.md)), broadcasts, confirms with retry, and updates each row's status to SUCCESS or FAILED.
{% endstep %}

{% step %}

### Retry anything that failed

Use **Retry Failed** to re-run only the rows that did not go through. Rows that already succeeded are left alone.
{% endstep %}
{% endstepper %}

[**Open Close Token Account in the app →**](https://j.tools/en/tools/close-account)

{% hint style="info" %}
**About wallet warnings.** Some tools bundle several instructions into one transaction, for example creating a token and its metadata together. Phantom can show a caution banner for these transactions. The banner is expected here and does not mean something is wrong. Read what you are signing, then approve.
{% endhint %}

## The options, explained

* **Mode:** Wallet Scan works on the connected wallet only. Multi Wallet scans and closes across the wallets whose private keys you paste, one per line, up to 1000.
* **Close Mode:** Only Empty closes zero-balance accounts. Burn & Close burns any leftover balance first, then closes, and requires a confirmation dialog before burning.
* **Gas Paid By (Multi Wallet):** Connected Wallet sponsors all fees, so imported wallets need no SOL. Each Wallet makes every imported wallet pay its own fee. Dedicated Wallet uses a separate pasted fee-payer key for all gas.
* **Reclaimed Rent To (Multi Wallet):** Connected Wallet consolidates all reclaimed rent to the connected wallet. Each Owner returns rent to each owning wallet. Custom Address sends it to a public address you paste.
* **Fee-Payer Wallet Key:** The private key of a funded wallet that pays all gas. Shown only when Gas Paid By is set to Dedicated Wallet.
* **Filters:** A free-text filter across account, token, mint, and wallet, plus Closable Only and Selected Only toggles, and Select Visible / Clear Visible bulk actions. Rows sort by rent, highest first.
* **Per-row selection and status:** Every scanned account is a row with a checkbox, balance, plan, and an IDLE / SUCCESS / FAILED status. Empty accounts are pre-selected. Non-empty ones must be selected deliberately.

## Fees and costs

{% hint style="warning" %}
**About fees.** Every action has two costs: the Solana **network fee** paid to validators, and the **J Tools platform fee**. The platform fee always shows in the app before you confirm, and nothing is charged until you sign. Fees can change over time, so trust the in-app summary rather than a number you saw once.
{% endhint %}

**Current platform fee: 5% of the rent each closed account returns.** The app shows the exact amount in the fee summary before you sign. For a standard SPL account that returns exactly 0.00203928 SOL, the cut is roughly 0.000102 SOL. A Token-2022 account with extensions holds more rent, so it returns more and the 5% cut is larger.

| Cost                 | Amount                                                             |
| -------------------- | ------------------------------------------------------------------ |
| J Tools platform fee | 5% of the reclaimed rent (about 0.000102 SOL per standard account) |
| Solana network fee   | a small amount per transaction, paid to validators                 |

Example: closing 100 standard accounts costs about 0.0102 SOL in platform fees.

The platform fee is charged on-chain inside the same close transaction, and only on successful closes. It is tiny next to the rent you reclaim, so the net result is still SOL back in your wallet. Each close transaction also pays the standard Solana network fee, a few thousand lamports, paid in SOL by whoever you set as the gas payer. The exact platform amount appears in the live fee summary on the page (labeled **Platform Fee** and **Estimated Fee**) and on the [Fee schedule](/reference/fee-schedule.md). For how platform fees work across the suite, see [Fees explained](/getting-started/fees-explained.md).

## Common mistakes and troubleshooting

* **A wallet has no SOL for gas.** In "Each Wallet" gas mode, a wallet with zero SOL cannot pay its own fee and that row fails. Switch Gas Paid By to **Connected Wallet** or **Dedicated Wallet** so a funded wallet sponsors the fees.
* **Invalid or duplicate key.** Multi Wallet mode flags each pasted line. Remove invalid or repeated entries before scanning.
* **Closed an account you still wanted.** Closing only releases rent and never destroys a held balance under "Only Empty". If you used Burn & Close on a row with a balance, that burn is permanent and the balance is gone for good.
* **Some rows failed.** Use **Retry Failed** to re-run only those rows. Network congestion is a common cause and a retry often clears it.

For the full list, see the [Error codes reference](/reference/error-codes.md).

## Advanced tips

* For many wallets, set **Gas Paid By** to **Connected Wallet** and **Reclaimed Rent To** to **Connected Wallet** to sweep all the rent into one place in a single pass, even when the owning wallets hold no SOL.
* Keep a balance you actually want? Move it out first with [Multi Sender](/tools/wallets/multi-sender.md), then close the now-empty account, rather than reaching for Burn & Close.
* To burn tokens without closing the account, use [Burn Tokens](/tools/token/burn-tokens.md) instead.

## Related tools

{% content-ref url="/pages/7CPBHR61Y6akMdkeSBGW" %}
[Batch SOL and Token Collector](/tools/wallets/batch-collector.md)
{% endcontent-ref %}

{% content-ref url="/pages/El6oae0bfwSTjeoxgA0u" %}
[Burn Solana Tokens](/tools/token/burn-tokens.md)
{% endcontent-ref %}

{% content-ref url="/pages/ABVX2mBQDoCv7DEdVmKp" %}
[Multi Sender and Airdrop](/tools/wallets/multi-sender.md)
{% endcontent-ref %}

{% content-ref url="/pages/a7TACAPAW24OFOSbtgNw" %}
[Solana Wallet Generator](/tools/wallets/wallet-generator.md)
{% endcontent-ref %}

{% hint style="success" %}
**J Tools is non-custodial.** We never store or transmit your private keys and never ask for your seed phrase. Every transaction is signed in your own browser, and nothing about a key ever reaches our servers. A few multi-wallet tools do let you paste private keys for throwaway hot wallets, which stay in your browser tab and are used only to sign locally. Never paste a key tied to long-term holdings, and if a page ever asks for your seed phrase, stop and close it.
{% endhint %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.j.tools/tools/utilities/close-account.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
