A Solana public key is 32 bytes. Wallets, explorers and RPC show it as base58 text, usually 43 or 44 characters, but nothing on chain stores that text: transactions and accounts hold the raw bytes. A decoder should keep keys as bytes, compare them as bytes and turn them into base58 only where people or RPC need text.
32 bytes#
Inside a transaction every account address, program ID and lookup table address is exactly 32 bytes, with no length, checksum or type tag around it. For wallets those bytes are an Ed25519 public key. For other accounts they may be any 32-byte address the system accepts, including program-derived addresses, which by design are not valid public keys at all.
Because the width is fixed, comparing two addresses is a 32-byte memory comparison, and a set of addresses is a set of 32-byte values. That is as cheap as identity checks get.
The base58 alphabet#
Base58 writes a byte string as a number in base 58, using digits and letters but leaving out four characters that are easy to confuse: zero, capital O, capital I and lowercase l. Leading zero bytes are written as the digit 1, one per byte. That is why the System program, whose address is 32 zero bytes, appears as thirty-two 1s.
Base58 has no checksum. A mistyped address that still decodes to 32 bytes is a different, valid-looking address, so a decoder cannot detect typos in addresses it is given as text.
How long an address is in text#
Across the fee payers and programs of two mainnet blocks we sampled on 18 November 2026:
| Base58 length | Addresses | Why |
|---|---|---|
| 44 characters | 392 | most 32-byte values |
| 43 characters | 70 | smaller values need one character fewer |
| 32 characters | 1 | the System program: all zero bytes, written as thirty-two 1s |
So do not validate an address by its text length. Validate it by decoding it and checking for exactly 32 bytes.
Off-curve addresses (PDAs)#
A program-derived address is a 32-byte address that no private key can sign for. It is the SHA-256 hash of the seeds, the program ID and the marker text ProgramDerivedAddress, and it must not land on the Ed25519 curve. Derivation tries a bump seed from 255 downward until the result is off the curve, and accepts at most 16 seeds of up to 32 bytes each.
For a decoder, PDAs are useful twice over. You can recompute an account's address from its seeds to confirm what it is, as the Pump.fun recipe does for bonding curves; and an address that is a PDA belongs to a program, not to a person. Associated token accounts are the best-known example.
Compare in bytes, display in base58#
The practical rule follows from all of this. Decode your watch lists from base58 once, at startup, into 32-byte values. Match transactions against them in bytes. Encode to base58 only for output: logs, user interfaces, JSON for other systems and RPC calls. Base58 encoding is a big-number conversion, far slower than a byte comparison, and repeating it for every key of every transaction is wasted work.
In our own TypeScript decoder tests, most decoding time went into turning account keys into base58 strings; moving that off the receive path was what kept up with a fast replay.
Keys on a shred decoder's hot path#
A shred decoder sees every key of every transaction in a block, most of which you do not care about. Matching program IDs and watched accounts as bytes lets you discard uninteresting transactions before converting anything. Filter by program ID and account and zero-copy parsing take the same idea further.
Questions about public keys and base58#
Why is the System program address all 1s?#
Its address is 32 zero bytes, and base58 writes each leading zero byte as the digit 1.
Is a base58 address always 44 characters?#
No. Most are 44 or 43; addresses with leading zero bytes are shorter.
Can I tell a wallet from a program-derived address by looking at it?#
Not from the text. A PDA is off the Ed25519 curve, which you can test on the decoded bytes, or confirm by recomputing it from its seeds.
What an address cannot tell you#
Thirty-two bytes say nothing about what an account holds, who controls it or whether it exists. A wallet address, a token account and a program all look alike; telling them apart takes account data, ownership or knowledge of how the address was derived. Raw shreds carry the addresses, not the accounts behind them.
Where addresses lead next#
The first signature is base58 text in the same alphabet, at twice the length. What is inside a Solana transaction shows where every address sits, and to match addresses in live traffic, decode a first transaction from raw shreds.
Sources#
- Solana docs source: accounts and addresses (checked 2026-11-18)
- solana-address 2.9.0: PDA_MARKER "ProgramDerivedAddress", MAX_SEEDS 16, MAX_SEED_LEN 32, bump search from 255, off-curve check (checked 2026-11-18)
- Mainnet getBlock slots 470,901,815 and 470,901,816: 463 distinct fee payer and program addresses (checked 2026-11-18)
Raw shreds on your own server
Ultra Low Latency Shreds is $200 and Standard Shreds is $100. You pay in crypto, tell us which IPv4 address and UDP port should receive the stream, and we wire it up by hand.