<p>Clone/download <a href="https://github.com/trezor/python-mnemonic/" rel="nofollow noreferrer">this code from Trezor</a> (don't forget the word list).</p>
<p>Then check your word-list like this:</p>
<pre><code>from mnemonic import Mnemonic

code = &quot;word1 word2 [...] word23 word24&quot;
mnemo = Mnemonic(&quot;english&quot;)
isValid = mnemo.check(code) # returns a boolean
print('Checksum is valid: ' + str(isValid))
</code></pre>

CC BY-SA 4.0
2019-12-15T21:47:24.233Z
2023-05-30T21:23:31.637Z
2023-05-30T21:23:31.637Z
Pedro
<p>Is there any Python package which will allow me to verify if the checksum of a bip39 mnemonic is valid?  For instance, I have a 24-word bip39 mnemonic, and I might have made a mistake for one of the words.  I want to see which words will result in a valid checksum.</p>
<p>I've seen Javascript versions, but nothing in Python</p>

CC BY-SA 4.0
2023-05-31T09:44:53.307Z
If this is being done with a significant amount of funds at stake (e.g. your life savings) be careful with what server you enter your mnemonic into. Ideally it should be a "airgapped computer that has no WiFi, Bluetooth, Ethernet or other networking capability"
Michael Folkson
<bip32-hd-wallets><wallet-recovery><python><mnemonic-seed><checksum>
bip39 checksum python
Sameer L
# bip39 checksum python

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

Is there any Python package which will allow me to verify if the checksum of a bip39 mnemonic is valid? For instance, I have a 24-word bip39 mnemonic, and I might have made a mistake for one of the words. I want to see which words will result in a valid checksum.

I've seen Javascript versions, but nothing in Python

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

> **Comments:**
> **username_1**: If this is being done with a significant amount of funds at stake (e.g. your life savings) be careful with what server you enter your mnemonic into. Ideally it should be a "airgapped computer that has no WiFi, Bluetooth, Ethernet or other networking capability"  

---

## 1 answers

### Answer by username_2 on 2019-12-15. Score: 2 | Accepted answer

Clone/download [this code from Trezor](https://github.com/trezor/python-mnemonic/) (don't forget the word list).

Then check your word-list like this:

```
from mnemonic import Mnemonic

code = "word1 word2 [...] word23 word24"
mnemo = Mnemonic("english")
isValid = mnemo.check(code) # returns a boolean
print('Checksum is valid: ' + str(isValid))

```


---

