Developer
Keccak-256 Hash & Function Selector
What is the hash or selector of this?
Get the Keccak-256 and SHA-256 hash of any text or hex, and the 4-byte selector or event topic of a Solidity signature.
Runs in your browser: what you type isn't sent anywhere.
How to use it
- Type text, paste hex, or write a function, event or error signature.
- Choose whether the input is text or hex bytes.
- Copy the hash, selector or topic you need.
What you'll get
- Keccak-256 as Ethereum uses it, plus SHA-256
- Function and error selectors, event topics (topic 0)
- Accepts transfer(address,uint256) or a full Solidity line
Questions and answers
Is Keccak-256 the same as SHA-3?
No. Ethereum uses the original Keccak-256, chosen before SHA-3 was finalised. The official SHA3-256 adds different padding, so the results differ. Solidity's keccak256() matches this tool.
What is a function selector?
The first 4 bytes of the Keccak-256 hash of a function's canonical signature, like transfer(address,uint256). Transaction data starts with it so the contract knows which function to run.
What is an event topic?
Topic 0 of an event log is the full Keccak-256 hash of the event's signature, like Transfer(address,address,uint256). Explorers and indexers use it to find events.
Why does my selector not match?
The selector is taken from the canonical form: no spaces, no parameter names, and full type names (uint256, not uint). The tool shows the canonical form it used, so you can compare.
Is my input sent anywhere?
No. Everything is computed in your browser.
Related tools
- ABI Encoder & DecoderPaste a contract ABI to check it, list its functions, events and errors, encode a call, or decode call data and event logs.
- Transaction Data DecoderTurn raw transaction data into a readable function and values, with warnings for risky approvals.
- Hex ConverterConvert hexadecimal and decimal values used on blockchains, up to 256 bits.