ReCaseText

Keccak-256 Hash Generator

Generate Keccak-256 hashes used in Ethereum

About Keccak-256 Hash Generator

Keccak-256 is the hashing algorithm used throughout Ethereum. It produces a 256-bit (32-byte) digest from any input, and it is central to how Ethereum works: addresses are derived from Keccak-256 hashes of public keys, function calls are identified by the first 4 bytes of the Keccak-256 hash of the function signature, event topics are Keccak-256 hashes of event signatures, and storage slot locations for mappings use Keccak-256.

This tool hashes any text input with Keccak-256 and outputs the result as a hex string. You can get the full 64-character hash or just the first 8 characters (4 bytes), which is the function selector format used in Ethereum ABI encoding. It is invaluable for smart contract developers who need to compute selectors, verify event topics, or debug calldata.

Keccak-256 vs SHA-3

Ethereum adopted Keccak before NIST finalized the SHA-3 standard, and the NIST version introduced a small padding change. As a result, Ethereum's "SHA-3" is technically Keccak-256, not NIST SHA-3-256. This tool uses the original Keccak-256 as used by Ethereum.

Frequently asked questions

What is a function selector?

A function selector is the first 4 bytes of the Keccak-256 hash of a function's signature (e.g., 'transfer(address,uint256)'). It's used to identify which function to call in a smart contract.

Is this the same as SHA-3?

No. Ethereum uses the original Keccak-256, which differs slightly from the NIST-standardized SHA-3-256 due to a padding change. This tool uses Keccak-256 as Ethereum uses it.

Can I use this for Solidity development?

Yes. This generates the same output as Solidity's keccak256() function and abi.encodePacked() when used with a string input.