<p>The bitcoin-explorer (<strong>bx</strong>) command at <a href="https://github.com/libbitcoin/libbitcoin-explorer/wiki/bx-mnemonic-to-seed" rel="nofollow noreferrer"><strong>mnemonic-to-seed</strong></a> throws exceptions if the checksums don't don't add up.</p>

<p>When you find combinations of BIP 39 words that pass checksum tests, then perform an operation like this to identify Bitcoin compressed Bitcoin addresses that might have funds:</p>

<p>% <code>echo "bunker wreck real edge inflict aerobic buddy mercy divorce wolf bright immune fat foot poet section sustain reveal unique reflect have latin problem chapter" | bx mnemonic-to-seed -p 123 | bx hd-new | bx hd-private -d -i 44 | bx hd-private -d -i 0 | bx hd-private -d -i 0 | bx hd-public -i 0  | bx hd-public -i 0  | bx hd-to-ec | bx ec-to-address -v 0</code></p>

<p><strong>1Ec2nBkUMSQmmhxWeXMB98gFVCKTmHbRJb</strong></p>

<p>Then examine the results of <a href="https://blockchain.info/address/1Ec2nBkUMSQmmhxWeXMB98gFVCKTmHbRJb" rel="nofollow noreferrer">https://blockchain.info/address/1Ec2nBkUMSQmmhxWeXMB98gFVCKTmHbRJb</a> to see if there was ever any wallet activity for M/44'/0'/0'/0/0.</p>

<p>This approach for older BIP 44 P2PKH addresses can be automated with scripts. This approach can also be extended to accommodate newer <strong>segwit-related</strong> BIP 49 P2WPKH-nested-in-P2SH addresses that begin with the number 3. The basis for doing so is provided below.  </p>

<p>% <code>echo "bunker wreck real edge inflict aerobic buddy mercy divorce wolf bright immune fat foot poet section sustain reveal unique reflect have latin problem chapter" | bx mnemonic-to-seed -p 123 | bx hd-new | bx hd-private -d -i 49 |  bx hd-private -d -i 0 | bx hd-private -d -i 0 | bx hd-private -i 0 | bx hd-private -i 0 | bx hd-to-ec | bx ec-to-public | bx bitcoin160</code>
<strong>351d3fffea471eb3740a5661cf059b5eb73483dd</strong></p>

<p>% <code>echo "0 [351d3fffea471eb3740a5661cf059b5eb73483dd]" | bx script-to-address -v 5</code>
<strong>35QwHbjUTo31tyTJruMPbrokCqjaTVdmTr</strong></p>

CC BY-SA 3.0
2017-12-07T19:01:08.070Z
As I implied in my answer, I don't see anything in BIP39 that would imply that the order of the words is checksummed. Can you be more specific about "checksums don't add up" or "pass checksum tests"? If I'm right, the only way to test word order is the blockchain.info test with bx's output that you specified, or the input-into-HD-wallet test that I mentioned. Thanks for any insight...
brec
CC BY-SA 3.0
2017-12-07T19:10:53.073Z
Proper behavior: 
% bx mnemonic-to-seed --language en rebel genius lunar mosquito pupil toilet web machine make stumble wear identify
**bc1dc4505b7c258cd7a140d8ccc14d6a5bcd5313ad4c132d3db089e69845ae95a5bd43d43194a12036acf46a9a78c1f3a86d40f7cab8a0d6789365c5ab1497e7**

Exception thrown: 

% bx mnemonic-to-seed --language en rebel genius lunar mosquito pupil toilet web machine make stumble wear wear
**The specified words are not a valid mnemonic in the specified dictionary.**
skaht
CC BY-SA 3.0
2017-12-07T19:18:18.853Z
At least one of those words, "en", is not on the BIP39 word list, so that would generate a "not a valid mnemonic" exception; I believe a count of 14 words would also. What I'm inquiring about is an exception generated by an incorrect word ordering.
brec
CC BY-SA 3.0
2017-12-07T19:20:51.653Z
That tells one that a bad combination of BIP 39 words were grouped together. Read https://github.com/libbitcoin/libbitcoin-explorer/wiki/bx-mnemonic-to-seed to see what the **en** argument does.
skaht
CC BY-SA 3.0
2017-12-07T21:28:06.277Z
Right, I overlooked the "--" prefix on "language" ("language" is in the BIP39 dictionary!)  Sorry. But, copy-pasting the command from your reply above: $ ./bx mnemonic-to-seed --language en rebel genius lunar mosquito pupil toilet web machine make stumble wear identify 
bc1dc4505b7c258cd7a140d8ccc14d6a5bcd5313ad4c132d3db089e69845ae95a5bd43d43194a12036acf46a9a78c1f3a86d40f7cab8a0d6789365c5ab1497e7
brec
CC BY-SA 3.0
2017-12-07T21:48:06.793Z
...And then I changed the word order and got the error! So I'll go back to the (mental) drawing board on the order issue. Meanwhile, any idea why you get an error but I don't on this particular word list?
brec
CC BY-SA 3.0
2017-12-09T03:19:50.017Z
With 12 words, there will be 12! (479,001,600) combinations of words.  Most of the combinations will fail.  Scripting is needed to run through the combinations to find combination that don't through exceptions. The seed word that don't throw exceptions are the ones that have their addresses checked to determine if any public addresses have funds. The needle in the haystack can be found with 12 seed words. It will take some time, possibly months to calculate and perform blockchain lookups to identify the proper seed word order.
skaht
CC BY-SA 3.0
2017-12-09T13:48:03.923Z
Exactly so, although in the terminology of combinatorics the issue is permutations rather than combinations.
brec
CC BY-SA 4.0
2017-12-07T17:44:19.853Z
2018-07-30T13:26:46.170Z
2018-07-30T13:26:46.170Z
skaht
<p>Have you tried btcrecover?: <a href="https://github.com/gurnec/btcrecover" rel="nofollow noreferrer">https://github.com/gurnec/btcrecover</a></p>

<blockquote>
  <p>An open source Bitcoin wallet password and seed recovery tool designed
  for the case where you already know most of your password/seed, but
  need assistance in trying different possible combinations.</p>
</blockquote>

CC BY-SA 4.0
2018-06-20T16:38:18.377Z
2018-06-20T16:38:18.377Z
Herald Smit
<p>As already suggested you should try the <a href="https://github.com/gurnec/btcrecover/blob/master/docs/Seedrecover_Quick_Start_Guide.md" rel="nofollow noreferrer">Seed Recover</a> script. </p>

CC BY-SA 4.0
2019-09-18T05:49:08.300Z
2019-09-18T05:49:08.300Z
fran2k
<p>I have a 12 word mnemonic but I'm unsure of the order, I know that the BIP39 mnemonics use a checksum, are there any tools I can use to re-order the 12 words correctly so that they pass the checksum?</p>

CC BY-SA 3.0
2017-12-07T17:24:35.437Z
Is the checksum used for fixing the order or just for fixing typos / eliminating similar looking words?
Sergei Tikhomirov
CC BY-SA 4.0
2023-01-03T21:38:17.907Z
@SergeiTikhomirov typos fixed by words being distant enough from each other. I would say check sums are for fixing order, mostly.
Moonwalker
<blockchain><wallet-recovery><bip32-hd-wallets><mnemonic-seed>
Unsure order of 12 word mnemonic
theintellects
# Unsure order of 12 word mnemonic

(Asked by: username_0 on 2017-12-07)

I have a 12 word mnemonic but I'm unsure of the order, I know that the BIP39 mnemonics use a checksum, are there any tools I can use to re-order the 12 words correctly so that they pass the checksum?

**Tags:** blockchain, wallet-recovery, bip32-hd-wallets, mnemonic-seed

> **Comments:**
> **username_1**: Is the checksum used for fixing the order or just for fixing typos / eliminating similar looking words?  
> **username_2**: @username_1 typos fixed by words being distant enough from each other. I would say check sums are for fixing order, mostly.  

---

## 3 answers

### Answer by username_3 on 2017-12-07. Score: 2

The bitcoin-explorer (**bx**) command at [**mnemonic-to-seed**](https://github.com/libbitcoin/libbitcoin-explorer/wiki/bx-mnemonic-to-seed) throws exceptions if the checksums don't don't add up.

When you find combinations of BIP 39 words that pass checksum tests, then perform an operation like this to identify Bitcoin compressed Bitcoin addresses that might have funds:

% `echo "bunker wreck real edge inflict aerobic buddy mercy divorce wolf bright immune fat foot poet section sustain reveal unique reflect have latin problem chapter" | bx mnemonic-to-seed -p 123 | bx hd-new | bx hd-private -d -i 44 | bx hd-private -d -i 0 | bx hd-private -d -i 0 | bx hd-public -i 0 | bx hd-public -i 0 | bx hd-to-ec | bx ec-to-address -v 0`

**1Ec2nBkUMSQmmhxWeXMB98gFVCKTmHbRJb**

Then examine the results of <https://blockchain.info/address/1Ec2nBkUMSQmmhxWeXMB98gFVCKTmHbRJb> to see if there was ever any wallet activity for M/44'/0'/0'/0/0.

This approach for older BIP 44 P2PKH addresses can be automated with scripts. This approach can also be extended to accommodate newer **segwit-related** BIP 49 P2WPKH-nested-in-P2SH addresses that begin with the number 3. The basis for doing so is provided below.

% `echo "bunker wreck real edge inflict aerobic buddy mercy divorce wolf bright immune fat foot poet section sustain reveal unique reflect have latin problem chapter" | bx mnemonic-to-seed -p 123 | bx hd-new | bx hd-private -d -i 49 | bx hd-private -d -i 0 | bx hd-private -d -i 0 | bx hd-private -i 0 | bx hd-private -i 0 | bx hd-to-ec | bx ec-to-public | bx bitcoin160`
**351d3fffea471eb3740a5661cf059b5eb73483dd**

% `echo "0 [351d3fffea471eb3740a5661cf059b5eb73483dd]" | bx script-to-address -v 5`
**35QwHbjUTo31tyTJruMPbrokCqjaTVdmTr**

> **Comments:**
> **username_4**: As I implied in my answer, I don't see anything in BIP39 that would imply that the order of the words is checksummed. Can you be more specific about "checksums don't add up" or "pass checksum tests"? If I'm right, the only way to test word order is the blockchain.info test with bx's output that you specified, or the input-into-HD-wallet test that I mentioned. Thanks for any insight...  
> **username_3**: Proper behavior:  % bx mnemonic-to-seed --language en rebel genius lunar mosquito pupil toilet web machine make stumble wear identify **bc1dc4505b7c258cd7a140d8ccc14d6a5bcd5313ad4c132d3db089e69845ae95a5bd43d43194a12036acf46a9a78c1f3a86d40f7cab8a0d6789365c5ab1497e7**  Exception thrown:   % bx mnemonic-to-seed --language en rebel genius lunar mosquito pupil toilet web machine make stumble wear wear **The specified words are not a valid mnemonic in the specified dictionary.**  
> **username_4**: At least one of those words, "en", is not on the BIP39 word list, so that would generate a "not a valid mnemonic" exception; I believe a count of 14 words would also. What I'm inquiring about is an exception generated by an incorrect word ordering.  
> **username_3**: That tells one that a bad combination of BIP 39 words were grouped together. Read https://github.com/libbitcoin/libbitcoin-explorer/wiki/bx-mnemonic-to-seed to see what the **en** argument does.  
> **username_4**: Right, I overlooked the "--" prefix on "language" ("language" is in the BIP39 dictionary!)  Sorry. But, copy-pasting the command from your reply above: $ ./bx mnemonic-to-seed --language en rebel genius lunar mosquito pupil toilet web machine make stumble wear identify  bc1dc4505b7c258cd7a140d8ccc14d6a5bcd5313ad4c132d3db089e69845ae95a5bd43d43194a12036acf46a9a78c1f3a86d40f7cab8a0d6789365c5ab1497e7  
> **username_4**: ...And then I changed the word order and got the error! So I'll go back to the (mental) drawing board on the order issue. Meanwhile, any idea why you get an error but I don't on this particular word list?  
> **username_3**: With 12 words, there will be 12! (479,001,600) combinations of words.  Most of the combinations will fail.  Scripting is needed to run through the combinations to find combination that don't through exceptions. The seed word that don't throw exceptions are the ones that have their addresses checked to determine if any public addresses have funds. The needle in the haystack can be found with 12 seed words. It will take some time, possibly months to calculate and perform blockchain lookups to identify the proper seed word order.  
> **username_4**: Exactly so, although in the terminology of combinatorics the issue is permutations rather than combinations.  

---

### Answer by username_5 on 2018-06-20. Score: 0

Have you tried btcrecover?: <https://github.com/gurnec/btcrecover>

> An open source Bitcoin wallet password and seed recovery tool designed
> for the case where you already know most of your password/seed, but
> need assistance in trying different possible combinations.


---

### Answer by username_6 on 2019-09-18. Score: 0

As already suggested you should try the [Seed Recover](https://github.com/gurnec/btcrecover/blob/master/docs/Seedrecover_Quick_Start_Guide.md) script.


---

