> For the complete documentation index, see [llms.txt](https://docs.clv.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.clv.org/portal/technical-documentation/web3-compatibility/eth_chainid.md).

# eth\_chainId

```
web3.eth.getChainId([callback])
```

#### Returns

Returns chain ID.

#### Example

```
> web3.eth.getChainId().then(console.log);
> 1023
```
