Appearance
web3_sha3
served · same as reth
Returns the Keccak-256 hash of the given data.
When to use
Use it to compute a hash when your tool has no Keccak function, for example the topic of an event signature.
Example
bash
curl -s -X POST -H 'Content-Type: application/json' \
--data '{"jsonrpc": "2.0", "id": 1, "method": "web3_sha3", "params": ["0x68656c6c6f"]}' \
http://127.0.0.1:8547json
{
"jsonrpc": "2.0",
"id": 1,
"method": "web3_sha3",
"params": [
"0x68656c6c6f"
]
}Response
Live mainnet, 2026-10-14. Checked against reth 2.7: equal.
json
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8"
}Parameters
| Name | Type | Required | Meaning |
|---|---|---|---|
data | hex data | yes | The bytes to hash. |
Returns
The 32-byte hash as hex.
Compared with reth
The live example above gives the same answer on Cinder and on reth 2.7.
Schema (OpenRPC)
Parameter data: Bytes
json
{
"title": "hex encoded bytes",
"type": "string",
"pattern": "^0x[0-9a-f]*$"
}Result: Hash32
json
{
"title": "32 byte hex value",
"type": "string",
"pattern": "^0x[0-9a-f]{64}$"
}