Skip to content

eth_chainId ​

served · same as reth

Returns the chain ID of the network, for example 0x1 for Ethereum mainnet.

When to use ​

Use it to check that a wallet or a script talks to the right network before it signs a transaction.

Example ​

bash
curl -s -X POST -H 'Content-Type: application/json' \
  --data '{"jsonrpc": "2.0", "id": 1, "method": "eth_chainId", "params": []}' \
  http://127.0.0.1:8547
json
{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "eth_chainId",
  "params": []
}

Response ​

Live mainnet, 2026-10-14. Checked against reth 2.7: equal.

json
{
  "jsonrpc": "2.0",
  "id": 1,
  "result": "0x1"
}

Full response

Parameters ​

None.

Returns ​

The chain ID as a hex string. Mainnet is 0x1.

Compared with reth ​

The live example above gives the same answer on Cinder and on reth 2.7.

net_version.

Schema (OpenRPC) ​

The official specification: eth_chainId in ethereum/execution-apis.

Result: string
json
{
  "pattern": "^0x(0|[1-9a-f][0-9a-f]*)$",
  "title": "hex encoded unsigned integer",
  "type": "string"
}