# Import Pandacoin wallet

## Import Pandacoin wallet

Two ways to bring an existing wallet into the desktop client:

* **A whole `wallet.dat` file** — dropping in a complete wallet.
* **Individual private keys** — importing one address at a time via the console.

Pick the one that matches what you have.

{% hint style="warning" %}
**Back up your current wallet first.** Importing over an existing `wallet.dat` replaces it. See Backup Pandacoin wallet before you do anything below.
{% endhint %}

### Option 1 — import a `wallet.dat` file

Use this if you have a backup file from another Pandacoin client (another machine, an old install, etc.).

1. **Close the Pandacoin client** completely.
2. **Open your Pandacoin data directory** for your OS:

<table><thead><tr><th width="140">Platform</th><th>Default location</th></tr></thead><tbody><tr><td><strong>Windows</strong></td><td><code>%appdata%\Pandacoin\</code></td></tr><tr><td><strong>macOS</strong></td><td><code>~/Library/Application Support/Pandacoin/</code></td></tr><tr><td><strong>Linux</strong></td><td><code>~/.pandacoin/</code></td></tr></tbody></table>

3. **Rename the existing `wallet.dat`** to something like `wallet-old.dat` (keep it — don't delete it yet).
4. **Copy your backup `wallet.dat`** into this directory.
5. **Restart the Pandacoin client.** It'll sync and show the imported balance.

{% hint style="info" %}
If the imported wallet was created long before your last sync, the client may re-scan the blockchain for its transactions. This can take a while — it's doing the right thing.
{% endhint %}

### Option 2 — import individual private keys

Use this if you have private keys (e.g. from the extractor tool or a paper wallet) rather than a whole `wallet.dat`.

1. Open the Pandacoin client and let it fully sync.
2. Go to **Help → Debug Window**.
3. Click the **Console** tab.
4. Run:

```
importprivkey <your-private-key>
```

Replace `<your-private-key>` with the actual key — no `<` or `>`. Press Enter.

5. The client will rescan the blockchain for transactions on that address. This takes a few minutes.
6. Repeat for each private key you want to import.

{% hint style="warning" %}
**If your wallet is encrypted,** you'll need to unlock it first. Run `walletpassphrase "yourpassword" 600` in the console (600 seconds = 10 minutes of unlock time), then run `importprivkey`. Close the console and lock the wallet again when you're done.
{% endhint %}

### After importing

* **Verify the balance.** Make sure everything you expected to see is there. If not, let the rescan finish — sometimes the UI updates slowly.
* **Make a fresh backup.** Your `wallet.dat` now contains the new keys — back it up again so the imported addresses are protected. See Backup Pandacoin wallet.
* **Never share the private key you just imported.** Paste it into the console, then close the console. Don't leave it in a text file on your desktop.

### Troubleshooting

<details>

<summary><strong>The balance is zero after importing</strong></summary>

The client needs to rescan the blockchain to find your transactions. On first import, this can take several minutes to over an hour depending on how old the address is. Let it finish. If balance still shows zero after rescan completes, double-check you imported the correct key.

</details>

<details>

<summary><strong><code>Error: Please enter the wallet passphrase with walletpassphrase first</code></strong></summary>

Your wallet is encrypted. Unlock it with `walletpassphrase "yourpassword" 600` before running `importprivkey`.

</details>

<details>

<summary><strong>The client won't start after replacing <code>wallet.dat</code></strong></summary>

The backup file may be corrupted or from an incompatible version. Restore your original `wallet.dat` (the one you renamed to `wallet-old.dat`) and ask in [Telegram](https://t.me/pandacoin) for help.

</details>

### Related guides


---

# Agent Instructions: 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:

```
GET https://wiki.pandacoin.tech/support/support-guide/import-pandacoin-wallet.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
