In this quick guide, you will learn how to export and import your private keys in MetaMask. Thus how to connect your existing Ethereum addresses to MetaMask by importing the address using your private key and how to export such key for use in another wallet.
Let’s get to it!
What is Private Key in Crypto
A private key is a computer-generated code that is used to make cryptocurrency transactions and prove ownership of your assets.
MetaMask or any other crypto wallet uses an algorithm that generates your private key. Generated Private Key is then a key directly to your holdings. Or rather to your Ethereum address that contains your coins. So anyone that has the access to your private key has also access to your assets. Thus Never reveal your private key string to anyone!
On the other hand, the big advantage of Private Keys is that if you want to completely change your wallet, you don’t have to transfer your holdings to a new one and pay unnecessary gas fees. Just export the private keys and import them into the new wallet.
How to export your Private Key from MetaMask
Private Key is not tied to your MetaMask wallet as a whole. But every crypto address has its own Private Key. So first thing first consider to which account you want to get a Private Key. This means that in the case, that you want to migrate all your possessions from different MetaMask accounts to, let’s say Brave wallet, you will need to export each account individually.
First, select the MetaMask account you want to export the private key for. You can do that by tapping the profile picture and selecting one of your accounts under “My Accounts”.
As you can see in the image, there aren’t many options for me as I only have one account open.
Once you have selected the correct account, go back to your wallet and click the three dots next to your account name. This opens up a window with several different choices. But we want to choose “Account details”.
Here you can either rename your account, see your ETH address and view it on Etherscan or lastly Export your Private key. Tap the last option.
You will now be asked to verify yourself using your MetaMask password. This is the password you enter every time you want to access the browser extension.
After you enter your password you will see your MetaMask Private Key for that account. Now you can freely import it to another wallet of your choice and manage your holdings there.
How to import your Private Key to MetaMask
In the same way, you can move from MetaMask to another wallet you can also do that the other way around. Maybe you don’t like the other wallet users’ interface and want to move to MetaMask. Now we will look at how to import your keys to MetaMask.
Open the wallet in your browser and click on your profile picture. This time we are not selecting an already existing account, but we want to import a new one. So tap on “Import Account”.
After you select the “Import Account” option you will have two different importation methods available. JSON file, which is a Java Script written text, or Private Key. Select the Private Key method and paste your private key string in the window below.
After you have done that tap “Import” and your address will be automatically imported to your MetaMask.
What to know about Imported Accounts
The imported account will not tie to your previously created MetaMask account. As well as they won’t tie to your MetaMask recovery phrase. Your secret recovery phrase will still only recover the account that it was generated for.
So whatever reason you import your address into MetaMask, you need to keep your Private Key in a safe place and not lose it. As this will remain your only last option to possibly restore your crypto address. It is also an option to keep the original wallet still installed as a backdoor.
What to do if somebody got my Private Key
If your Private Key got compromised immediately transfer all your funds from the corresponding wallet address. Because there is no way to reset your Private Keys. Once they are generated they will always be tied to your account.
As stated before, when somebody got your Private Keys, they also have all your holdings.
Frequently Asked Questions about MetaMask & Private Keys
Both are security features underlying Metamask and usually most crypto wallets. However, their function is quite different.
Seed Recovery Phrase is used to restore your entire MetaMask Wallet, including all wallets that were created within the wallet.
On the other hand, Private Key is used to import one specific account, or rather one specific crypto address to another wallet. Any imported account will not tie to the existing ones, and not even to your existing seed recovery phrase.
MetaMask account as a whole cannot be recovered except through a recovery phrase. However if you have your Private Keys safely stored somewhere, these can be used to recover your accounts one by one.
If you have lost your Private Keys as well as your seed phrase you won’t be able to recover your wallet. But there might be a little hope for you. All the data that Metamask creates is written to your Hard Drive, from which it can then be retrieved, including access to your wallet.
This data is encrypted on your Hard Disk. To decrypt it, you only need to know the password that was used to secure the wallet. To do that follow this guide.