Keccak-256 Hash Calculator

Hash text or raw bytes with Keccak-256 as used by Ethereum, and compare with SHA3-256 and SHA-256. The result updates as you type; the first four bytes are the Solidity function selector.

Computed in your browser with JavaScript. Addresses are never uploaded or stored.

What is Keccak-256?

Keccak-256 is the 256-bit sponge hash function that Ethereum uses everywhere: an address is the last 20 bytes of Keccak-256 of the public key, a function selector is the first 4 bytes of Keccak-256 of the canonical signature, and event topics, EIP-55 checksums and storage slots all derive from it. It is the original Keccak submission, which differs from NIST's finalised SHA3-256 only in the padding byte, so the two give different digests for the same input.

Typical uses

Test vectors

InputKeccak-256
(empty)0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470
abc0x4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45
Transfer(address,address,uint256)0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef

Paste any of these to confirm the implementation before relying on it.

Keccak-256 vs. SHA3-256 vs. SHA-256

FunctionFamilyPadding / constructionUsed by
Keccak-256Keccak sponge, rate 1088 bitspad10*1 with 0x01 domain byteEthereum, Tron (TVM), all EVM chains
SHA3-256Keccak sponge, rate 1088 bitspad10*1 with 0x06 domain byte (FIPS 202)NIST applications, some non-EVM chains
SHA-256Merkle–Damgård (SHA-2)length padding, 512-bit blocksBitcoin, Tron txID, TLS, Base58Check

Worked example: SHA3-256 of abc in a FIPS 202 library returns 0x3a985da74fe225b2045c172d6bd390bd855f086e3e9d525b46bfe24511431532, while Keccak-256 of the same three bytes is the 0x4e03657a… value in the table above. If a contract or explorer value does not match your library, the padding byte is the first thing to check.

Frequently asked questions

Is Keccak-256 the same as SHA3-256?

No. Ethereum adopted Keccak before NIST finalised SHA-3, and the final standard changed the padding byte (0x01 for Keccak, 0x06 for SHA3). The two produce different outputs for the same input, which is why web3 libraries call the function keccak256 rather than sha3. This page shows both so you can see the difference.

What does Ethereum use Keccak-256 for?

Deriving addresses from public keys (last 20 bytes of the hash), function selectors and event topics (hash of the signature), EIP-55 checksums, storage slot computation for mappings, Merkle-Patricia trie nodes and the block and transaction hashes.

Should I hash text or hex?

Pick UTF-8 text for signatures and plain strings. Pick hex when you have raw bytes, for example an uncompressed public key or ABI-encoded data; the 0x prefix is optional. Hashing the text "0xabcd" and the bytes 0xabcd gives different results.

Is the hash computed on your server?

No. Keccak, SHA3 and SHA-256 are implemented in JavaScript on this page and run in your browser. The page makes no network requests after loading.

What is the Keccak-256 of an empty string?

0xc5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470. It appears constantly in Ethereum: it is the code hash of every account that has no code, which is why explorers show it for ordinary wallets.

Can I verify a Bitcoin value here?

SHA-256 is included, so you can single-hash data. Bitcoin's double-SHA-256 and RIPEMD-160 are not exposed as separate outputs, but the Bitcoin address validator performs them internally when checking addresses.