Fundamentals
Solana Address Length: Why Solana Addresses Are 32 to 44 Characters Long
Solana addresses are 32-byte keys in Base58, so they range from 32 to 44 characters. Why lengths vary, why most are 43-44, how to validate.

From 32 bytes to Base58 text
Under the text, every Solana address is exactly 32 bytes: an Ed25519 public key for wallets, mints and programs, or a 32-byte hash for program derived addresses. Base58 represents that number using 58 symbols. Since 58 to the power 44 is larger than 2 to the power 256 while 58 to the power 43 is not, 44 characters are always enough and sometimes necessary.
Base58 is not a fixed-width encoding like hexadecimal, where 32 bytes are always 64 characters. It converts the whole 32-byte value to a base-58 number, so smaller numbers need fewer digits. That alone explains why addresses do not all have the same length. Every address returned by the Solana prefix and suffix generator follows this rule.
The same 32 bytes could be shown as 64 hexadecimal characters, which is how some developer tools and logs print raw keys, or as a list of 32 numbers, which is how solana-keygen stores the public half inside a keypair JSON file alongside the private half. Base58 text is the standard human-facing form used by wallets, explorers, RPC responses and the Solana CLI.
How lengths are distributed in practice
For a random 32-byte key, 2 to the power 256 divided by 58 to the power 43 is about 17.2, which means roughly 94 percent of keys need 44 characters and nearly all the rest need 43. Working it out exactly gives about 94.2 percent at 44 characters, 5.7 percent at 43 and 0.1 percent at 42 or fewer. A sample of 200,000 random keys encoded in Base58 matched this: 188,870 of length 44, 11,129 of length 43 and a single one of length 42. How the first character changes prefix odds is covered in the Base58 difficulty notes.
Each further character shorter is about 58 times rarer, and lengths in the 30s only appear when the key begins with several zero bytes, each of which occurs by chance with probability 1 in 256. So in everyday use you will see 43 and 44 character addresses almost exclusively. A pasted address of 40 characters is far more likely to be truncated than to be a rare short key.
| Length | How it arises | How often for random keys |
|---|---|---|
| 44 characters | Large 32-byte values | About 94 percent |
| 43 characters | Values below 58 to the power 43 | About 5.7 percent |
| 42 or fewer | Very small values or several leading zero bytes | About 0.1 percent, falling about 58 times per character |
| 32 characters | All 32 bytes are zero | Only the System Program address |
Leading zero bytes become leading 1s
Base58 has a special rule for leading zero bytes: each one is written as the character 1, the first symbol of the alphabet, and the rest of the value is encoded normally. That rule keeps the encoding reversible, since otherwise leading zeros would disappear.
The extreme case is a value made entirely of zero bytes, which encodes to 32 consecutive 1s. That string, 11111111111111111111111111111111, is the address of the System Program, the native program that owns every ordinary wallet account. Other built-in programs use readable, mostly-1 addresses too, such as NativeLoader1111111111111111111111111111111, which owns the System Program account.
Built-in sysvars use a related trick. SysvarRent111111111111111111111111111111111 and SysvarC1ock11111111111111111111111111111111 spell a readable word and pad the rest with 1s, which in that position are simply zero digits of the Base58 number rather than zero bytes. Nobody holds a private key for these addresses; they identify runtime accounts, so the same style is suitable for constants and programs, never for wallets that need to sign.
System Program: 11111111111111111111111111111111 (32 characters, 32 zero bytes)
Typical address: 43 or 44 characters
4 leading zero bytes then random bytes: starts with 1111, 41 to 43 charactersWhy most addresses start with 2 to H
Length and the first character are linked. Because a 44-character address represents a value below 2 to the power 256, its leading Base58 digit can only be one of 17 symbols, 2 through 9 and A through J, with J itself uncommon. Only 43-character addresses can start with K to Z or a lowercase letter.
This has a practical effect on custom addresses: a prefix beginning with a lowercase letter or a late uppercase letter is much rarer than the same text as a suffix. The prefix or suffix guide and Solana address pattern ideas use this when recommending placements.
How to validate a Solana address
Character count is a weak check. A robust validation decodes the Base58 string and confirms it yields exactly 32 bytes; that catches invalid characters, truncation and extra characters at once. Libraries do this for you: in @solana/web3.js, constructing a PublicKey from the string throws if it is not valid, and @solana/kit provides isAddress and assertIsAddress for the same purpose.
For addresses meant to receive funds, also check whether the key is on the Ed25519 curve. PublicKey.isOnCurve returns true for normal keypair-based addresses such as wallets and false for program derived addresses, which no private key controls. An off-curve result is correct for a PDA but a red flag if someone presents it as their personal wallet.
The Solana CLI performs the same parsing. Commands such as solana balance and solana account reject a malformed address before contacting the network, and solana-keygen verify checks that a keypair file matches a given public key, which is useful when confirming a custom address file before funding it.
import { PublicKey } from "@solana/web3.js";
function checkAddress(text) {
try {
const key = new PublicKey(text); // throws on invalid Base58 or wrong size
return { valid: true, onCurve: PublicKey.isOnCurve(key.toBytes()) };
} catch {
return { valid: false, onCurve: false };
}
}Length-related mistakes to avoid
Do not enforce exactly 44 characters in forms or databases; you will reject nearly 6 percent of valid addresses. A column sized for 44 characters is enough, and a check for 32 to 44 characters is a reasonable pre-filter before proper decoding. Never trim or pad addresses, because a leading 1 is meaningful data.
Treat a run of leading 1s with curiosity rather than suspicion. Each one stands for a zero byte at the start of the key; built-in programs use such addresses on purpose, while for random wallet keys a long run is rare enough that it usually signals a deliberately chosen address.
If a pattern or address fails validation even though the length looks right, the problem is usually a character outside the alphabet, covered in Base58 invalid characters. And whatever the length, verify the full string before sending funds, as explained in verifying an address before sending.
- Reject anything shorter than 32 or longer than 44 characters outright.
- Decode and require exactly 32 bytes.
- Use isOnCurve only to distinguish wallets from PDAs, not as a validity test.
- Store addresses as text exactly as given, case-sensitive.
Continue the practical setup
- Solana Base58 Characters: Why 0, O, I and l Are Rejected — The Base58 alphabet used by Solana addresses, the four excluded characters, valid substitutions for common words and the errors they cause.
- Verify a Solana Address Before Sending: Checks That Work — How to verify a Solana address before sending SOL or tokens: compare the full string, spot address poisoning, test transfers, account types.
- Open the complete workflow guide to place these checks in order.
- Open the address generator when you have chosen a compatible format and pattern.
Frequently asked questions
How many characters is a Solana address?
Between 32 and 44 characters. About 94 percent of addresses are 44 characters and most of the rest are 43. Much shorter addresses only occur when the key starts with several zero bytes.
Is a 43-character Solana address valid?
Yes. Roughly 6 percent of random addresses are 43 characters long because their 32-byte value is small enough to fit. Validate by decoding to 32 bytes rather than by counting characters.
Why is the System Program address all 1s?
It is the Base58 encoding of 32 zero bytes. Each leading zero byte is written as 1, so 32 zero bytes become 32 ones.
Can a Solana address be longer than 44 characters?
No. Any 32-byte value fits in 44 Base58 characters. A longer string is not a Solana address, possibly a private key, a signature or a value from another chain.
Do I need to count characters to validate an address?
No. Counting is only a quick pre-filter. Decode the Base58 string and require exactly 32 bytes, which also catches invalid characters such as 0, O, I and l.
Sources and editorial method
The technical references below support the concepts discussed in this article. Examples and comparison worksheets are explanatory, not measured service benchmarks.



