<p>Bitcoin has used the same hex encoding for hashes since the very beginning. Any software written since then therefore also expects that same hex encoding. Bech32 was introduced nearly a decade into Bitcoin's life. To change all of the existing encodings to something else would simply break all software written for Bitcoin up to that point. That is simply not a reasonable tradeoff for something that is relatively unimportant.</p>
<p>Also bech32 is not much shorter than hex for representing 32 bytes of data. Although base32 is, bech32 includes a human readable part and a checksum, both of which make the length almost as long as the hex encoding, and neither of those is particularly useful to users.</p>

CC BY-SA 4.0
2024-04-21T16:42:40.213Z
2024-04-21T16:42:40.213Z
Ava Chow
<p>If I understand correctly, transaction IDs and block digests are typically hex-encoded in the bitcoin ecosystem including bitcoin-core RPC calls, block explorers, etc.</p>
<p>Meanwhile, bech32 encoding would result in smaller strings and also provides checksums.</p>
<p>I am wondering if there is any technical reason for hex encoding, or it is just a status-quo situation.</p>
<p>In other words, if bitcoin-core were to be written from scratch today, would we likely choose hex, bech32, base58, or something else for encoding hashes, eg block and transaction?</p>

<bitcoin-core><bech32-address><base58><encoding>
Why doesn't bitcoin use bech32 encoding for transaction_id and block hash?
user49396
# Why doesn't bitcoin use bech32 encoding for transaction_id and block hash?

(Asked by: username_0 on 2024-04-21)

If I understand correctly, transaction IDs and block digests are typically hex-encoded in the bitcoin ecosystem including bitcoin-core RPC calls, block explorers, etc.

Meanwhile, bech32 encoding would result in smaller strings and also provides checksums.

I am wondering if there is any technical reason for hex encoding, or it is just a status-quo situation.

In other words, if bitcoin-core were to be written from scratch today, would we likely choose hex, bech32, base58, or something else for encoding hashes, eg block and transaction?

**Tags:** bitcoin-core, bech32-address, base58, encoding


---

## 1 answers

### Answer by username_1 on 2024-04-21. Score: 4 | Accepted answer

Bitcoin has used the same hex encoding for hashes since the very beginning. Any software written since then therefore also expects that same hex encoding. Bech32 was introduced nearly a decade into Bitcoin's life. To change all of the existing encodings to something else would simply break all software written for Bitcoin up to that point. That is simply not a reasonable tradeoff for something that is relatively unimportant.

Also bech32 is not much shorter than hex for representing 32 bytes of data. Although base32 is, bech32 includes a human readable part and a checksum, both of which make the length almost as long as the hex encoding, and neither of those is particularly useful to users.


---

