Ethereum addresses are fundamental to interacting with the blockchain—whether you're sending funds, deploying smart contracts, or verifying digital signatures. This guide dives into the structure, validation, and utility functions related to Ethereum addresses, ensuring developers and users alike can work confidently with them.
We'll explore address formats, checksum mechanisms, conversion methods, and essential ethers.js utilities such as getAddress, isAddress, computeAddress, recoverAddress, and contract address derivation functions.
What Is an Ethereum Address?
An Ethereum address is a 20-byte (40 hexadecimal character) identifier derived from the public key of a cryptographic key pair. Represented as a hex string prefixed with 0x, it serves as a unique account identifier on the Ethereum network.
For example:
0x8ba1f109551bd432803012645ac136ddd64dba72While lowercase addresses are valid, Ethereum supports a checksummed format—a mixed-case representation that helps prevent errors during manual entry or copy-paste operations.
Checksum Addresses: Preventing Human Error
To reduce the risk of sending funds to incorrect addresses due to typos, Ethereum adopted the EIP-55 checksum standard. This method uses a specific pattern of uppercase and lowercase letters based on the Keccak-256 hash of the address (without the 0x prefix).
👉 Discover how blockchain tools help prevent transaction errors with real-time validation.
When an address contains mixed case, it signals that it's been checksummed. Any function returning an address in ethers.js (like getAddress) will return a checksummed version if valid.
Example: Using getAddress
ethers.utils.getAddress("0x8ba1f109551bd432803012645ac136ddd64dba72");
// Returns: '0x8ba1f109551bD432803012645Ac136ddd64DBA72'If the provided address has invalid checksum casing, an error is thrown:
ethers.utils.getAddress("0x8Ba1f109551bD432803012645Ac136ddd64DBA72");
// Throws: [Error: bad address checksum]This strict validation ensures data integrity when handling user input.
ICAP Address Format (Legacy)
The ICAP (Inter-exchange Client Address Protocol) was an early attempt to introduce checksum protection using the IBAN banking standard, assigning country code XE for Ethereum.
There were two variants:
- Direct mode: For addresses starting with a zero byte (
0x0...), allowing full IBAN compatibility. - Basic mode: Supports full 20-byte addresses but isn't compatible with standard IBAN systems.
Though largely deprecated today, ethers.js still accepts ICAP-formatted addresses and converts them internally.
Converting to ICAP
Use getIcapAddress to convert a standard address:
ethers.utils.getIcapAddress("0x8ba1f109551bd432803012645ac136ddd64dba72");
// Returns: 'XE65GB6LDNXYOFTX0NSV3FUWKOWIXAMJK36'And verification works both ways:
ethers.utils.isAddress("XE65GB6LDNXYOFTX0NSV3FUWKOWIXAMJK36");
// trueDespite its decline in use, understanding ICAP helps interpret legacy systems and older wallet implementations.
Validating Ethereum Addresses
Before processing any transaction, validating an address is crucial. The isAddress utility checks whether a string represents a valid Ethereum address in any supported format—standard hex, checksummed, or ICAP.
Example Usage
ethers.utils.isAddress("0x8ba1f109551bd432803012645ac136ddd64dba72");
// true
ethers.utils.isAddress("XE65GB6LDNXYOFTX0NSV3FUWKOWIXAMJK36");
// true
ethers.utils.isAddress("I like turtles.");
// falseThis flexibility allows applications to accept various input styles while maintaining security through normalization.
Deriving Addresses from Keys
You can generate an Ethereum address from either a private key or public key using computeAddress.
From Private Key
ethers.utils.computeAddress("0xb976778317b23a1385ec2d483eda6904d9319135b89f1d8eee9f6d2593e2665d");
// '0x0Ac1dF02185025F65202660F8167210A80dD5086'From Public Key (Compressed or Uncompressed)
// Compressed
ethers.utils.computeAddress("0x0376698beebe8ee5c74d8cc50ab84ac301ee8f10af6f28d0ffd6adf4d6d3b9b762");
// Uncompressed
ethers.utils.computeAddress("0x047669..."); // full 65-byte keyAll forms yield the same result—the rightmost 20 bytes of the Keccak-256 hash of the public key.
Recovering an Address from a Signature
Using ECDSA signature recovery, you can determine which address signed a given message digest. This is vital for verifying off-chain messages and implementing meta-transactions.
Example with Structured Signature
const digest = "0x7c5ea36004851c764c44143b1dcb59679b11c9a68e5f41497f6cf3d480715331";
ethers.utils.recoverAddress(digest, {
r: "0x528459e4aec8934dc2ee94c4f3265cf6ce00d47cf42bb106afda3642c72e25eb",
s: "0x42544137118256121502784e5a6425e6183ca964421ecd577db6c66ba9bccdcf",
v: 27
});
// '0x0Ac1dF02185025F65202660F8167210A80dD5086'Or using a concatenated signature string:
const signature = "0x5284...bccdcf1b"; // r + s + v
ethers.utils.recoverAddress(digest, signature);This functionality underpins secure wallet authentication and decentralized identity systems.
Generating Contract Addresses
When deploying contracts, Ethereum computes deterministic addresses based on sender and nonce (or salt).
Using getContractAddress (CREATE Opcode)
For standard deployments via CREATE, the address depends on the creator’s address and nonce:
const from = "0x8ba1f109551bD432803012645Ac136ddd64DBA72";
const nonce = 5;
ethers.utils.getContractAddress({ from, nonce });
// '0x082B6aC9e47d7D83ea3FaBbD1eC7DAba9D687b36'Using getCreate2Address (CREATE2 Opcode)
With CREATE2, the address is determined by sender, salt, and the hash of initialization code:
const salt = "0x7c5ea36004851c764c44143b1dcb59679b11c9a68e5f41497f6cf3d480715331";
const initCode = "0x6394198df16000526103ff60206004601c335afa6040516060f3";
const initCodeHash = ethers.utils.keccak256(initCode);
ethers.utils.getCreate2Address(from, salt, initCodeHash);
// '0x533ae9d683B10C02EbDb05471642F85230071FC3'👉 Learn how advanced contract deployment enhances predictability and security in dApp development.
This enables predictable contract addresses before deployment—critical for trustless factories and upgradeable patterns.
Frequently Asked Questions
What is an Ethereum address?
An Ethereum address is a 40-character hexadecimal string (20 bytes) derived from a public key. It uniquely identifies an externally owned account or smart contract on the Ethereum blockchain.
How does checksumming improve security?
Checksummed addresses use mixed case based on EIP-55 rules to detect typing errors. If a single character is mistyped, the checksum fails, preventing accidental fund loss.
Can I use ICAP addresses today?
While most modern wallets no longer support ICAP, ethers.js retains backward compatibility. However, new projects should rely on standard or checksummed hex formats.
How do I validate an Ethereum address?
Use ethers.utils.isAddress(address) to check validity across all formats—including standard hex, checksummed, and ICAP. It returns true only for syntactically correct addresses.
What’s the difference between CREATE and CREATE2?
CREATE generates contract addresses using the deployer’s address and nonce (sequential), while CREATE2 uses deployer, salt, and init code hash—allowing pre-computed, deterministic addresses independent of nonce.
Can I recover who signed a message?
Yes. With recoverAddress(digest, signature), you can derive the signer’s Ethereum address using ECDSA public key recovery—essential for message verification in decentralized apps.
Core Keywords
- Ethereum address
- Checksum address
- ICAP format
- Address validation
- Contract address generation
- EIP-55
- CREATE2
- ECDSA recovery
These keywords reflect core concepts developers search for when working with Ethereum addressing schemes and cryptographic utilities.
👉 Enhance your blockchain development workflow with secure tools and APIs.
By mastering Ethereum addresses—from basic format to advanced derivation—you ensure safer interactions, fewer errors, and more robust decentralized applications. Whether validating user input or precomputing contract locations, these utilities form the backbone of reliable Web3 engineering.