Free tool

Keccak-256 Hash & Function Selector

Hash any string with Keccak-256 and get the 4-byte function selector and 32-byte event topic the EVM uses.

Keccak-256 is the hash function the EVM uses for Solidity's keccak256, function selectors, event topics, and storage slots. This tool hashes a string (or raw hex) and returns the full 32-byte digest plus the first 4 bytes — the function selector that identifies a method like transfer(address,uint256) in calldata.

Keccak-256 digest (32 bytes)0xa9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b
Function selector (first 4 bytes)0xa9059cbbThe method id at the front of a function call's calldata.
How it works

Keccak-256 is the original Keccak submission that Ethereum adopted (it differs slightly from the finalized NIST SHA-3). It is used pervasively: Solidity's keccak256(), the selectors that route calldata to functions, the topics that index events, and the slot computation for mappings all rely on it. Monad, being EVM-equivalent, uses the same function.

A function selector is the first 4 bytes of the Keccak-256 hash of the function's canonical signature — for example keccak256("transfer(address,uint256)") starts with 0xa9059cbb, the selector that appears at the front of every ERC-20 transfer's calldata. Event topics use the full 32-byte hash of the event signature.

The tool lets you hash either the UTF-8 text of a string or the raw bytes of a 0x hex input, matching how Solidity treats abi.encodePacked of a string versus bytes.

Monmint is a no-code ERC-20 creator on Monad — launch a verified token in one transaction.

Create a token on Monad
FAQ

Common questions

Is Keccak-256 the same as SHA-3?
Not exactly. Ethereum uses the original Keccak-256, which differs from the finalized NIST SHA3-256 in its padding. Solidity's keccak256 is the Ethereum variant.
What is a function selector?
It is the first 4 bytes of the Keccak-256 hash of a function's signature, e.g. transfer(address,uint256) → 0xa9059cbb. It identifies which function calldata is calling.
What is the hash of an empty string?
keccak256 of empty input is 0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 — a useful sanity check.
Should I hash text or hex?
Hash text for signatures and strings (UTF-8 bytes). Hash hex when you already have raw bytes you want the digest of.
Keep reading