Bitcoin Forum

Bitcoin => Bitcoin Technical Support => Topic started by: cellard on April 24, 2018, 02:27:15 PM



Title: How to know if a wallet.dat is a BTC wallet or an altcoin (small trick)
Post by: cellard on April 24, 2018, 02:27:15 PM
I often see people talking about this, asking about how they can know where a certain wallet.dat file belongs to.

Well I have found a small and useful trick that could help. You simply open your wallet.dat file, with any text editor of choice, and use ctrl+f to search for "name"" and if your wallet.dat file had any addresses, you will find them there. Now you just have to look at the format and you'll know. (If they begin with 1, it's BTC, if they begin with L, it's LTC...). Most have very recognizable formats. In the case of doubt, just enter the address in the block explorers you suspect the address belongs to look for any funds. This way you don't have to wait for it to sync to see if your wallet matches the client. And this is the trick I've been using when I found random wallet.dat files.


Title: Re: How to know if a wallet.dat is a BTC wallet or an altcoin (small trick)
Post by: fabioganga on April 24, 2018, 04:27:48 PM
I often see people talking about this, asking about how they can know where a certain wallet.dat file belongs to.

Well I have found a small and useful trick that could help. You simply open your wallet.dat file, with any text editor of choice, and use ctrl+f to search for "name"" and if your wallet.dat file had any addresses, you will find them there. Now you just have to look at the format and you'll know. (If they begin with 1, it's BTC, if they begin with L, it's LTC...). Most have very recognizable formats. In the case of doubt, just enter the address in the block explorers you suspect the address belongs to look for any funds. This way you don't have to wait for it to sync to see if your wallet matches the client. And this is the trick I've been using when I found random wallet.dat files.

It is a nice trick indeed. Thanks! However it must be noted that some forks of Bitcoin share the same format. Think of Bitcoin cash, Bitcore, Bitcoin Gold and others. However, your trick will indeed restrict the possibilities and give a definite clue on what coin the wallet belongs to.


Title: Re: How to know if a wallet.dat is a BTC wallet or an altcoin (small trick)
Post by: onnz423 on April 24, 2018, 08:12:37 PM
Excellent information, and very useful. Now I know which of my locked wallets is a Litecoin wallet.

Is there some sort of list for all the different coin types?

+1 from me.


Title: Re: How to know if a wallet.dat is a BTC wallet or an altcoin (small trick)
Post by: Thirdspace on April 24, 2018, 10:57:55 PM
It is a nice trick indeed. Thanks! However it must be noted that some forks of Bitcoin share the same format. Think of Bitcoin cash, Bitcore, Bitcoin Gold and others. However, your trick will indeed restrict the possibilities and give a definite clue on what coin the wallet belongs to.
Bitcoin cash has changed its address format, correct? take a look at this latest block #527,350 (https://bch.btc.com/000000000000000001d9c65475febd09c389e27954462e55c8bf31cf902c5402) BCH chain
all addresses starts with 'q', no longer with '1'. I believe they changed the address formatting to avoid confusion BTC/BCH
I haven't checked exchanges, whether they also follow the new address format but by standard they should


Title: Re: How to know if a wallet.dat is a BTC wallet or an altcoin (small trick)
Post by: cellard on April 25, 2018, 02:12:16 PM
Nice trick, i didn't expect it works on encrypted wallet.dat. But some text editor show wallet.dat content on different format (such as Hex) when it can't recognize the format (such as Sublime Text 3). I think it would be great if there's example of finding the address on wallet.dat
Also, does all "default" wallet software use same format?

I found the trick works on wallet.dat that are encrypted too, simply because the part of the address list and the transaction history is unencrypted... this is obvious since anyone can open anyone's wallet.dat with the full client and see their addresses and transaction history. The only thing locked is transacting.

I always wanted the full wallet to be encrypted so in case anyone tries to see your transaction history and addresses they couldn't access it. I don't know why the design decision was to not fully encrypt the thing.


Title: Re: How to know if a wallet.dat is a BTC wallet or an altcoin (small trick)
Post by: vapourminer on April 28, 2018, 05:22:59 PM
thanks for posting this.

i have literally hundreds of wallet backups spread through dozens of hard drives. some ltc, some nmc, some btc. all just named "wallet.dat" before i figured i should give them a coin name a part of the name. always dreaded just dropping then into a client and seeing what happens.

this will help big time.


Title: Re: How to know if a wallet.dat is a BTC wallet or an altcoin (small trick)
Post by: cellard on April 29, 2018, 02:57:59 PM
thanks for posting this.

i have literally hundreds of wallet backups spread through dozens of hard drives. some ltc, some nmc, some btc. all just named "wallet.dat" before i figured i should give them a coin name a part of the name. always dreaded just dropping then into a client and seeing what happens.

this will help big time.

Indeed, it is a pain in the ass when you find a random wallet.dat file somewhere, and you don't know where it belongs, and you start droping the file on a ton of different potential full clients which you remember using back.. it's a mess.

Remember to use a block explorer if an address format is used in various coins, I think other coins also use an L for example, so it may not be Litecoin necessarily, a block explorer will make it clear, at least if it has funds in it.


Title: Re: How to know if a wallet.dat is a BTC wallet or an altcoin (small trick)
Post by: BillyBobZorton on June 11, 2018, 02:30:47 PM
Just found a massive stack of wallet.dat files from an old hard drive, this was really handful at trying to make sense out of it.


Title: Re: How to know if a wallet.dat is a BTC wallet or an altcoin (small trick)
Post by: tokexchain on June 14, 2018, 11:43:04 AM
That is some great info thanks and this will help me with the odd few .dats that are not marked, and I am sure as has been will help others too!