# How to Import a Vanity Private Key into MetaMask Safely

Source: https://www.ethvanity.com/blog/import-vanity-private-key-metamask

Published: 2026-11-02

Updated: 2026-11-09

![Imported key versus seed. Single key: Controls the imported account; Wallet seed: Does not automatically include imported keys; Verification: Compare the entire wallet-derived address.](https://www.ethvanity.com/images/blog/import-vanity-private-key-metamask-diagram-v2.webp)

Imported key versus seed. Single key: Controls the imported account; Wallet seed: Does not automatically include imported keys; Verification: Compare the entire wallet-derived address.

[Full-size diagram (SVG)](https://www.ethvanity.com/images/blog/import-vanity-private-key-metamask-diagram-v2.svg)

[Diagram download (PNG)](https://www.ethvanity.com/images/blog/import-vanity-private-key-metamask-diagram-v2.png)

In MetaMask, open the account selector, choose to add a wallet, select import an account and paste the private key. The imported account is not derived from your Secret Recovery Phrase, so restoring MetaMask from the phrase will not bring it back; you must back up that private key separately and securely.

## Before you import: check the key's origin

Importing is the last step, so make sure the key is worth importing. A vanity private key is only safe if it was generated offline, on your own hardware, by an open-source tool that seeds from a cryptographically secure random source. Keys from Profanity must not be used at all, as explained in the [Profanity vulnerability explainer](https://www.ethvanity.com/blog/profanity-vanity-address-vulnerability), and a key produced on someone else's server should be treated as already known to that server.

Verify the key before funding it. Derive the address from the private key with a trusted offline tool and confirm it matches the vanity address you expect; the derivation is explained in [how Ethereum addresses are derived](https://www.ethvanity.com/blog/how-ethereum-addresses-are-derived).

Plan where the key will live before importing it. Importing places the key inside MetaMask's encrypted vault on that device, so the security of the account becomes the security of that browser profile, your MetaMask password and the computer itself. Use a strong, unique password and avoid importing valuable keys on shared or work machines.


## Import steps in the MetaMask browser extension

MetaMask's support article on using an existing wallet describes the current flow. Menu labels change between versions, so follow the article if your screens differ.

Imported accounts are labeled in the account list so you can distinguish them from accounts created from your recovery phrase. Keep that distinction in mind when you back up, since the label is your reminder that the account depends on a separate private key backup.

- Unlock MetaMask and click the account selector at the top of the wallet.
- Click the option to add a wallet at the bottom of the account list.
- Select the option to import an account.
- On the private key screen, paste the 64-character hex private key and confirm the import.
- Check that the address shown matches your expected vanity address character for character, then rename the account so you can recognize it.

## Import steps in MetaMask Mobile

On mobile the flow is the same, with one extra option: MetaMask can scan the key from a QR code if the source wallet supports it. Avoid displaying a private key as a QR code on a networked screen or photographing it; enter it only on the device that will hold it.

- From the wallet view, tap the current account to open the account selector.
- Tap the option to add a wallet at the bottom of the menu.
- Select the option to import an account.
- Paste the private key or scan its QR code, then confirm the import.

## Imported accounts are not backed up by your recovery phrase

MetaMask's documentation states that imported accounts are not derived from the Secret Recovery Phrase you created when you installed MetaMask, and that they will not appear automatically when you restore MetaMask with that phrase. If you lose the device and only have your 12-word phrase, the vanity account is gone unless you kept its private key elsewhere.

Back up the private key separately, offline, on paper or a metal backup stored as carefully as your recovery phrase. Do not store it in cloud notes, email, screenshots or chat messages. Keep in mind that the same key controls the same address on every EVM chain, as covered in [same address on every EVM chain](https://www.ethvanity.com/blog/same-address-every-evm-chain), so a leak exposes assets on all of them.


| Account type | Restored by Secret Recovery Phrase? | What you must back up |
| --- | --- | --- |
| Accounts created in MetaMask | Yes | The Secret Recovery Phrase |
| Imported private key account | No | The private key itself |
| Hardware wallet account | No (restored by the device's own phrase) | The hardware wallet's recovery phrase |


## Hardware wallet considerations

MetaMask can connect hardware wallets, but the accounts it shows from them are derived from the device's own recovery phrase. Hardware wallets such as Ledger and Trezor are built around phrase-based derivation and do not offer a way to load a single raw private key, so a vanity key imported into MetaMask is a hot key stored in the browser, protected only by your MetaMask password and your computer's security.

For large balances, a practical pattern is to use the vanity address as a public-facing receiving address and regularly sweep funds to a hardware wallet account. For contracts, a cleaner option is to keep admin rights on a hardware wallet or multisig and mine a vanity contract address with CREATE2 instead, which creates no secret at all, as described in [EOA vs CREATE2 vanity](https://www.ethvanity.com/blog/ethereum-wallet-vs-create2-vanity).


## Removing, hiding and re-importing accounts

MetaMask's support article on removing accounts explains that accounts created from your Secret Recovery Phrase cannot be removed, only hidden, while imported accounts can be removed in the browser extension through the account's menu and its account details. On MetaMask Mobile the article says only hardware wallet accounts can be removed, so use the extension if you need to remove an imported key.

Removing an account deletes the key from that MetaMask installation only. The address and its funds remain on-chain, and anyone holding the private key, including you from your backup, can import it again later. Before removing a funded account, confirm that your offline backup of the key is readable and correct by deriving the address from it.


| Problem | Likely cause | Fix |
| --- | --- | --- |
| Import rejected | Key not exactly 64 hex characters | Recopy without spaces or line breaks |
| Wrong address appears | A different key was pasted | Compare the key's source and re-derive offline |
| Account missing after restore | Imported accounts are not in the phrase | Import the private key again |
| Balance shows zero | Wrong network selected | Switch to the network that holds the funds |


## Key hygiene after importing

A few habits reduce the risk that comes with any hot private key.

Treat the import as a one-time operation. Every additional place the key is pasted, whether another wallet, a password manager or a second device, is another copy to protect, and every copy has to be considered compromised if that device is ever infected with malware that reads the clipboard or browser storage.

- Delete temporary copies of the key from the generator's output files and clipboard history after you have made your offline backup.
- Send a small test amount and sign a test transaction before using the address publicly.
- Save frequent counterparties in your address book to avoid look-alike addresses planted by [address poisoning](https://www.ethvanity.com/blog/ethereum-address-poisoning).
- Never enter the private key into a website that asks for it; legitimate dapps only ask you to connect and sign.
- If you suspect the key was exposed, move funds to a new account immediately and revoke token approvals from the old one.

## Explore the related mechanism

- [How Ethereum Addresses Are Derived from a Private Key](https://www.ethvanity.com/blog/how-ethereum-addresses-are-derived) — From secp256k1 private key to Keccak-256 hash, last 20 bytes and EIP-55 checksum, with an ethers v6 example and why it is one-way.
- [Profanity Vanity Address Vulnerability: What Happened in 2022](https://www.ethvanity.com/blog/profanity-vanity-address-vulnerability) — How Profanity's 32-bit seed made private keys recoverable, its link to the $160M Wintermute hack, and what to do if you used the tool.
- [Open the complete workflow guide](https://www.ethvanity.com/guide) to place these checks in order.
- [Open the address generator](https://www.ethvanity.com/) when you have chosen a compatible format and pattern.

## Frequently asked questions

### Will my imported vanity account come back if I restore MetaMask with my recovery phrase?

No. MetaMask states that imported accounts are not derived from your Secret Recovery Phrase and do not reappear on restore. You need to import the private key again.

### Can I import a vanity private key into a Ledger or Trezor?

No. These devices derive accounts from their own recovery phrase and do not import individual private keys. Use the vanity address as a hot receiving account and sweep funds to the hardware wallet.

### Why does MetaMask reject my private key?

An Ethereum private key is 32 bytes, written as 64 hex characters. Import usually fails because of a missing character, a trailing space or line break, or because a recovery phrase or a public address was pasted instead of the key.

### Does importing a key into MetaMask send it to MetaMask's servers?

MetaMask describes itself as a self-custodial wallet that stores keys encrypted locally on your device. The key is protected by your MetaMask password, so device security and password strength are what matter.

## Sources

- [MetaMask Support: Use an existing wallet (import an account)](https://support.metamask.io/start/use-an-existing-wallet/)

- [MetaMask Support: How to remove an account from your MetaMask wallet](https://support.metamask.io/configure/accounts/how-to-remove-an-account-from-your-metamask-wallet/)

- [1inch: A vulnerability disclosed in Profanity](https://1inch.com/blog/post/a-vulnerability-disclosed-in-profanity-an-ethereum-vanity-address-tool)

- [ethereum.org: Ethereum accounts](https://ethereum.org/en/developers/docs/accounts/)



Editorial method: https://www.ethvanity.com/about#publication-method
