Intermediate

What Is a Chain ID?

By DappAtlas Editorial ·

On this page

A chain ID is a number that uniquely identifies an EVM network, such as 1 for Ethereum or 8453 for Base. Wallets include it in every signed transaction so it cannot be replayed on another chain.

Key takeaways

  • Each EVM network has its own chain ID: 1 for Ethereum, 8453 for Base.
  • It is part of every signed transaction since EIP-155.
  • Wallets show it in decimal or hex (Base: 8453 or 0x2105).
  • A wrong chain ID when adding a network makes the wallet reject it.

Not to be confused with: rpc endpoint — the server URL you connect to; many endpoints can serve the same chain ID.

How a chain ID works

When you sign a transaction, the wallet mixes the chain ID into the signature. A node on another network sees a different chain ID and rejects the transaction, which prevents replay attacks.[1]

EIP-155 took effect with the Spurious Dragon hard fork at block 2,675,000. Before it, a signature covered six fields: nonce, gas price, gas limit, recipient, value and data. After it, the signing hash covers nine: the same six plus the chain ID and two zeros.[1]

The chain ID also shows up in the signature's v value, which EIP-155 sets to {0,1} + CHAIN_ID × 2 + 35. On Ethereum (chain ID 1) that gives v = 37 or 38, and the example transaction in the EIP ends up with v = 37. Legacy signatures with v = 27 or 28 are still valid, which means they carry no chain ID and are not protected from replay.[1]

How a chain ID is used

You enter it when adding a network to a wallet by hand, and apps use it to check that your wallet is on the right network before you sign.

Apps read the chain ID from your wallet or node with the eth_chainId JSON-RPC method, which returns the number as a hex string. The EIP's own example returns "0x3d", which is 61. EIP-695 tells apps to prefer eth_chainId over the older net_version call so they can reliably identify the chain they are talking to.[3]

When a site asks your wallet to add a network, it uses wallet_addEthereumChain from EIP-3085. The chainId field is the only required field, and it must be a hex string. The wallet must reject the request if the RPC URLs are missing, or if the chain ID does not match what eth_chainId returns from those URLs.[4]

Signed messages use the chain ID too. EIP-712 typed data can include a chainId in its domain, and the wallet should refuse to sign if that value does not match the chain it is currently on.[5]

Example: converting and checking a chain ID

Base lists chain ID 8453 for mainnet and 84532 for Base Sepolia, its testnet. The values in this example come from those docs; the RPC call is illustrative.[7]

Decimal to hex: 8453 = 2 × 4,096 + 1 × 256 + 0 × 16 + 5, so the hex digits are 2, 1, 0, 5 and the hex value is 0x2105. The same method turns 84532 into 0x14a34.

In an EIP-155 signature on Base, v = 8453 × 2 + 35 = 16,941 (or 16,942 depending on the parity bit). A node on Ethereum mainnet expects v = 37 or 38 and will not accept it.[1]

To check an RPC endpoint yourself, send {"jsonrpc":"2.0","method":"eth_chainId","params":[],"id":1} to it. A Base endpoint should return "0x2105". Any other value means the endpoint serves a different chain.[3]

Common chain IDs

The chainid.network registry lists these values: Ethereum Mainnet 1 (0x1), OP Mainnet 10 (0xa), BNB Smart Chain 56 (0x38), Polygon 137 (0x89), zkSync 324 (0x144), Base 8453 (0x2105), Arbitrum One 42161 (0xa4b1), Linea 59144 (0xe708) and Scroll 534352 (0x82750).[6]

Testnets have their own IDs: Sepolia is 11155111 (0xaa36a7), Hoodi is 560048 (0x88bb0) and Base Sepolia is 84532 (0x14a34). EIP-155 also reserves 1337 as the default for private Geth chains, so local development networks often use it.[6]

A chain ID does not tell you the gas token. In the same registry, Base, Arbitrum One and OP Mainnet use ETH, while Polygon 137 uses POL and BNB Smart Chain 56 uses BNB.[6]

Common mistakes

Typing the hex value into a field that expects decimal, or the reverse, gives a different network: 0x2105 is 8453, but the digits 2105 read as decimal are a different chain ID. JSON-RPC responses and EIP-3085 requests use hex.[4]

Picking a testnet ID by mistake is another frequent error. A wallet set to 84532 shows Base Sepolia balances, which are separate from Base mainnet balances at the same address.[7]

The Bottom Line

The chain ID tells wallets and nodes which network a transaction belongs to. Copy it from a trusted source when adding a network.

Educational content, not financial advice.

Pros
  • Stops transactions from being replayed on other chains
Cons
  • Copying the wrong ID from an unofficial list can connect you to a fake network
Sources (7)
  1. [1] Ethereum Improvement Proposals. “EIP-155: Simple replay attack protection.” Accessed Sep 26, 2026.
  2. [2] ethereum.org. “JSON-RPC API.” Accessed Sep 26, 2026.
  3. [3] Ethereum Improvement Proposals. “EIP-695: Create eth_chainId method for JSON-RPC.” Accessed Sep 26, 2026.
  4. [4] Ethereum Improvement Proposals. “EIP-3085: wallet_addEthereumChain RPC Method.” Accessed Sep 26, 2026.
  5. [5] Ethereum Improvement Proposals. “EIP-712: Typed structured data hashing and signing.” Accessed Sep 26, 2026.
  6. [6] chainid.network. “Chain list data (chains.json).” Accessed Sep 26, 2026.
  7. [7] Base docs. “Connect to Base.” Accessed Sep 26, 2026.
Developers

Chain ID FAQ

What is the chain ID of Ethereum?

Ethereum mainnet uses chain ID 1 (hex 0x1). Its main testnet, Sepolia, uses 11155111.

Why do wallets show the chain ID in hex?

The JSON-RPC API returns numbers in hexadecimal. 8453 in decimal is 0x2105 in hex; both mean Base.

How do I find the chain ID of a network I am connected to?

Call eth_chainId on its RPC endpoint. It returns a hex string such as 0x2105, which is 8453 (Base). Compare it with the network's own docs or chainid.network.

Can two networks share a chain ID?

They should not. EIP-155 asks every network to use a unique value, and registries such as chainid.network track which IDs are taken.

ShareXLinkedInRedditEmailReport outdated info

Who made this page

Written by
DappAtlas Editorial

Editorial team

Compiles and updates the glossary and guides on DappAtlas. Facts come from primary sources: each project’s own pages, protocol docs and standards. No project pays to be mentioned.

Lists from DappAtlas Editorial
Fact check
Checked against 7 sources

Last check: Sep 26, 2026

A value we could not confirm on the project’s own pages is marked “Not verified” instead of estimated.

How we review

How this page works

Sources: Ethereum Improvement Proposals, ethereum.org, Ethereum Improvement Proposals. Data as of Sep 26, 2026.

How we review

Not affiliated with any project listed. Educational content, not financial advice.