We don't hear it common but over and over there has been transfer gone wrong when sending Bitcoin to address, either to a wrong address or to a wrong network. Identifying address by format eradicate such mistakes because it helps decide what type of wallet or transaction is in use before sending.
Address Format | | | Identify By Prefix | | |
Legacy (P2PKH) | | | Begins with "1" - Bitcoin core and old Bitcoin mobile wallets | | |
P2SH | | | Begins with "3" Still part of segwit but older version | | |
Native Segwit (Bech32) | | | Begins with "bc1q" - modern and updated version of segwit | | |
Taproot Segwit (Bech32m) | | | Begins with "bc1p" - wallets like BlueWallet, Electrum and Sparrow wallet use taproot etc... | | |
Lightning Invoice | | | Begins with "lnbc1" - lnbc1 for Bitcoin, lntb for testnet | | |
Fees ComparisonAddress Format | | | Fee Levels | | |
Legacy (P2PKH) | | | Highest Fees | | |
P2SH | | | Medium - Better than Legacy | | |
Native Segwit | | | Lowest | | |
Taproot Segwit | | | Low - Better than P2SH (Simple tx X Complex tx ✓) | | |
Lightning Invoice | | | Zero or little | | |
Identifying any address can be done simply by knowing each prefix, another similar method is length of address but that may not be efficient as two address can have very close characters, example of P2SH and Legacy having close or similar characters.
I would start by firstly saying that the full meaning of Legacy's P2PKH is pay to public key hash and the P2SH is pay to script hash. While both of the older address versions have between 33 and 34 characters, Bech32 has 42 while Bech32m has 62 characters. With the way upgrades has been done so far am sure the error of inputting wrong addresses is easily addressed as invalid with checksum ability incorporated in Bitcoin addresses to this end.
Also, one interesting fact that connects all these types of addresses is that they are case sensitive and am sure we all know that different wallet addresses can generate different addresses for transactions for privacy concerns, while the previously used addresses still remains valid