How Unicode Normalization Changes a BIP39 Passphrase

Learn how BIP39 NFKD treats Unicode passphrases, which lookalikes and spaces stay different, and why wallet and SeedAddress input rules are separate.

How Unicode Normalization Changes a BIP39 Passphrase

A BIP39 passphrase is processed as Unicode text, but it is not compared as a simple visible label. BIP39 applies UTF-8 NFKD normalization to the mnemonic and to the passphrase before PBKDF2-HMAC-SHA512 derives the seed. Some different Unicode representations therefore become equivalent; many characters that look alike do not. For recovery, preserve the exact original input, confirm what the wallet accepts, and never assume that an accent, case change, space or lookalike is harmless.

What BIP39 normalizes

BIP39 specifies two related inputs for the mnemonic-to-seed step. The mnemonic is used as the PBKDF2 password. The salt is the string mnemonic followed by the passphrase. Both values are encoded as UTF-8 after NFKD normalization. With no passphrase, the passphrase is an empty string. The specification sets PBKDF2 to 2,048 iterations with HMAC-SHA512 and a 512-bit output.

This rule applies when compatible wallet software converts an already-created mnemonic into a BIP39 seed. It is separate from creating a mnemonic from entropy. The mnemonic is also normalized at this stage, so retain its words and language exactly as the wallet created them.

The maintained Trezor Python implementation makes the boundary visible in code: it normalizes the mnemonic and passphrase, adds the mnemonic salt prefix, encodes the values as UTF-8 and calls PBKDF2. That is useful as a reference, but another wallet must still document that it follows BIP39 and support the same wordlist and settings.

NFKD is not “remove the accents”

Unicode Standard Annex #15 describes normalization forms and the difference between canonical and compatibility equivalence. NFKD is Normalization Form Compatibility Decomposition: it decomposes characters according to those Unicode rules. It is not a general password-cleaning operation.

Consider two isolated representations of the same visible accented letter: U+00E9 and the sequence U+0065 U+0301. They are canonically equivalent and NFKD produces the same normalized sequence. That does not mean the plain letter U+0065 is equivalent to the accented letter. NFKD also does not give you a promise that every typographic variant or symbol has a meaningful wallet-compatible replacement.

Do not silently apply other transformations while copying a passphrase:

  • NFKD does not perform case folding. ASCII E (U+0045) and e (U+0065) remain different input unless the wallet has a separate rule.
  • It does not trim leading or trailing spaces, and it does not collapse two ordinary spaces into one. A space is data.
  • A character from another script can look like a Latin character without being the same code point. For example, Latin a (U+0061) and Cyrillic а (U+0430) are different characters and should not be treated as interchangeable.
  • “Visually identical” is not a cryptographic equivalence test. Font, keyboard, operating system and copy-and-paste behavior can hide the difference.

These examples use only harmless code-point fragments, not a wallet passphrase. Never test a real passphrase in an online Unicode converter or seed checker.

Why a visually identical copy can fail

If the passphrase and mnemonic normalize to the same NFKD sequences, they produce the same BIP39 seed when every other input matches. Different normalized bytes produce a different seed; later paths, networks and account settings affect addresses after this step, not the BIP39 seed itself.

Case, spacing and script lookalikes are common sources of mistakes. A keyboard may insert a non-breaking space (U+00A0), which NFKD maps to an ordinary U+0020 space; NFKD still does not trim or collapse ordinary leading, trailing or repeated ASCII spaces. An operating system may compose a character differently, or a person may replace a symbol with one that looks similar. You cannot infer the result just by looking at a rendered sentence.

The usual symptom is not a clear error. BIP39 passphrases are not a password-reset system: a valid mnemonic combined with a wrong passphrase can derive another valid wallet, often one that appears empty. The guide to an empty wallet after a wrong passphrase explains that symptom. A successful derivation is not proof that the copied text was intended; compare a known public receive address on the same network, account, path and index in the wallet's trusted flow before moving funds.

Wallet support comes before the standard

BIP39 defines normalization, not a universal text-entry experience. The wallet, device and companion application decide which characters and lengths are accepted and where the passphrase is typed.

For example, the current Trezor Suite passphrase guide documents standard ASCII support and different limits by model. It also warns that passphrases are case-sensitive, that a blank space counts as a character, and that mistyping opens a different wallet. Do not transfer those UI rules to every wallet, and do not assume that an accented passphrase can be entered on a particular device. Read the current manufacturer instructions for the exact model and software version.

Before relying on a passphrase, keep a private record of the phrase and its input method. A rehearsal with fictional data in a test wallet teaches the procedure but does not validate a real backup. For a real backup, use the original wallet's documented trusted flow, compare a public address, and preserve the working installation; never reset it for an unverified backup. Do not paste the phrase into this site or a web checker. If the current device cannot reproduce it, consult official migration documentation rather than improvising a Unicode conversion.

SeedAddress is a different input boundary

SeedAddress's password is not automatically a BIP39 passphrase. In the current browser implementation, the generator combines the selected coordinates, password, language and word length through its own deterministic process. The password is encoded as the literal UTF-8 input supplied to the browser before its hashes are calculated; it is not passed through BIP39's mnemonic-to-seed PBKDF2 step or silently normalized as an optional wallet passphrase.

That distinction matters during recovery. The selected location/address is public; the method adds no random entropy. Preserve the exact password, coordinates, language and word length, and keep an independent offline copy of the resulting phrase as a fallback. Exact inputs do not guarantee that a historical map lookup returns the same coordinates. Do not “repair” an old input by removing accents, changing case, trimming spaces or replacing a lookalike. SeedAddress does not recover a random phrase from another wallet, derive wallet addresses or convert formats. The SeedAddress recovery guide describes its limits, while the BIP39 passphrase comparison keeps the values separate.

A safe recovery checklist

  1. Identify whether the value belongs to BIP39 or to another generator or wallet setting.
  2. Record the original characters and check current device support without publishing the secret.
  3. Use the official trusted flow, compare the same public account and preserve independent backups before moving assets.

If two visible strings look the same, that is only a display observation. BIP39 compatibility depends on normalized text, exact wallet support and every other recovery setting. Treat Unicode handling as part of the backup specification, not as a formatting detail.

Sources