Keccak-256 Hash Online: Ethereum Keccak, Free
Compute the Keccak-256 hash used by Ethereum and Solidity for any text or file in your browser, with the original Keccak padding. Hex or Base64 output. Nothing is uploaded.
This is the digest of the empty input.
Keccak-256
About the Keccak-256 hash
This page computes the Keccak-256 hash of text or a file in your browser, the hash Ethereum calls keccak256. It uses the padding of the original Keccak submission, as Ethereum, Solidity, web3 libraries and many other blockchains do, not the padding NIST later adopted for SHA3-256. The digest is 32 bytes, shown as 64 hexadecimal characters. Type or paste text, or choose a file of up to 50 MB, and the digest appears at once. Nothing is uploaded, and your data never leaves your device.
How to get a Keccak-256 hash
Steps
- Type or paste the text, or press Choose file for a file of up to 50 MB.
- Keccak-256 is already selected in the Algorithm list; Keccak-224, Keccak-384 and Keccak-512 sit next to it.
- Press Copy Keccak-256 to copy the digest. Add the
0xprefix yourself if your tool expects it. - Paste an expected value into Compare with; the page reads Matches or No match. Remove a leading
0xfirst.
Privacy
The digest is computed by code running on this page. Your text and files are never uploaded to our servers and are forgotten when you close the tab.
Keccak-256 in Ethereum
Function selectors and event topics
A Solidity function selector is the first four bytes of the Keccak-256 of the function signature. Hashing transfer(address,uint256) gives a digest starting with a9059cbb, the selector every ERC-20 transfer call begins with. Event topics use the full 32-byte hash of the event signature in the same way. Write the signature without spaces or parameter names, exactly as the compiler does.
Text versus bytes
This page hashes the UTF-8 bytes of what you type, like keccak256(bytes("...")) in Solidity or keccak256(toUtf8Bytes(...)) in ethers. It does not decode hex: typing 0x1234 hashes those six characters, not two bytes. Addresses are derived from the Keccak-256 of the raw public key bytes, so they cannot be reproduced by typing the key as text.
Why it differs from SHA3-256
NIST changed one padding byte when it turned Keccak into the FIPS 202 standard. The permutation is identical but every digest differs: Keccak-256 of the empty input is c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470, while SHA3-256 of it begins a7ffc6f8. If a value will not match, check which of the two the other side uses; the SHA3-256 hash page computes the standard one.
Related tools
The Hash Calculator offers 32 algorithms, including double SHA-256 and RIPEMD-160 for Bitcoin. To read a signed token, see the JWT Decoder, and for MD5 through SHA-512 at once, the Hash Generator.
Open-source credits
Keccak-256 is computed by @noble/hashes by Paul Miller, MIT licence, following the Keccak team's original specification.