FormatterHQ

Keccak Hash Generator

Compute original Keccak hashes (224, 256, 384 or 512 bits) — the variant Ethereum and Solidity call keccak256, which differs from standard SHA-3.

Loading tool…
Ready.

How to use the Keccak Hash Generator

  1. Type or paste text into the input box, or switch the source to File and choose a file — it is hashed locally, never uploaded.
  2. Set Variant; the main result at the top updates as soon as you change it.
  3. Read the main hash at the top — the table below shows the same input under every other common algorithm. Tick Uppercase hex if you need capitals.
  4. To verify a value, paste it into Compare with an expected hash — the tool reports a match, or which algorithm it matches instead. Copy any row with its Copy button.

Keccak-256 hash generator for Ethereum

Keccak is the sponge-based hash that won NIST’s SHA-3 competition. Before the standard was finalised, NIST changed the padding rule, so the published SHA-3 functions differ from the original Keccak. Ethereum had already adopted the original, and it still uses Keccak-256 everywhere. This tool computes original Keccak-224, -256, -384 and -512.

Example: a Solidity function selector

Input (function signature):

transfer(address,uint256)

Keccak-256:

a9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049b

The first four bytes, a9059cbb, are the function selector for the ERC-20 transfer function — the value that appears at the start of the call data of every token transfer. SHA3-256 of the same text is 4b40e901eada9ab2…, which is why using the wrong function breaks contract calls.

Keccak vs SHA-3

Keccak-256 (original)SHA3-256 (FIPS 202)
Padding domain byte0x010x06
Permutation, rate, capacityIdenticalIdentical
Used byEthereum, Solidity, many EVM chainsStandards, general cryptography
Output for the same inputDifferentDifferent

Libraries are not always clearly named: in some JavaScript and Python packages, a function called “sha3” actually computes Keccak-256. When results do not match, this difference is the first thing to check. For the standard version, use SHA3-256.

Common Ethereum uses

  • Function selectors: first 4 bytes of keccak256("name(type1,type2)") — no spaces, canonical type names such as uint256.
  • Event topics: the full 32-byte hash of the event signature, e.g. Transfer(address,address,uint256).
  • Addresses: the last 20 bytes of the Keccak-256 hash of the uncompressed public key (without its 0x04 prefix byte).
  • Storage slots and mapping keys in contract storage layout.

To see exactly which bytes a signature string consists of before hashing, convert it with String to Hex.

Text vs bytes

This tool hashes the UTF-8 bytes of the text you type. That is right for signatures such as transfer(address,uint256). To hash binary data such as a public key or ABI-encoded values, the input must be the raw bytes, not their hex text — hashing the string “0xabc…” gives a different result. Developer libraries (ethers.js keccak256, web3.py Web3.keccak) accept byte arrays for that purpose.

Keccak is a fast hash and not a way to protect secrets such as seed phrases or private keys; never paste those into any website. Hashing here happens locally.

Reference values to check your setup

Well-known Ethereum hashes make good test inputs. If the tool, your library and a block explorer all agree on these, you are using the right function:

InputKeccak-256
Transfer(address,address,uint256)ddf252ad…f523b3ef, the ERC-20 Transfer event topic
Approval(address,address,uint256)8c5be1e5…c7c3b925, the Approval event topic
balanceOf(address)selector 70a08231
empty inputc5d24601…5d85a470, the code hash of accounts with no code

The most common signature mistakes are writing uint instead of uint256, adding spaces after commas and including parameter names. All three change the hash completely.

Frequently asked questions

Is Keccak-256 the same as SHA3-256?
No. They use the same permutation but different padding, so their outputs differ. Ethereum and Solidity use Keccak-256.
How do I calculate a Solidity function selector?
Hash the canonical signature, such as transfer(address,uint256), with Keccak-256 and take the first 4 bytes (8 hex characters).
Why does my hash not match ethers.js?
You may be hashing text where the library hashes bytes, or vice versa. Hashing the hex string of some data is not the same as hashing the data itself.
Which Keccak variants does the tool support?
Keccak-224, Keccak-256, Keccak-384 and Keccak-512, all with the original Keccak padding.

Last updated September 26, 2026

Related tools

MD2 Hash Generator Generate the MD2 hash of any text or file online. Instant 128-bit digest in hex, computed in your browser. MD4 Hash Generator Generate the MD4 hash of any text or file online. Instant 128-bit digest in hex, computed in your browser. MD5 Hash Generator Generate the MD5 hash of any text or file online. Instant 128-bit digest in hex, computed in your browser. NTLM Hash Generator Generate the Windows NTLM (NT) password hash — MD4 of the UTF-16LE password — online. Password Strength Checker Estimate password entropy and crack time for online and offline attacks, and spot common patterns — checked privately in your browser. PBKDF2 Hash Generator Generate PBKDF2-HMAC-SHA256/512 derived keys and Django-style password hashes with your own salt and iteration count, using WebCrypto. RIPEMD-160 Hash Generator Generate the RIPEMD-160 hash of any text or file online. Instant 160-bit digest in hex, computed in your browser. RSA Key Pair Generator Generate RSA 2048, 3072 or 4096-bit public/private key pairs in PEM (PKCS#8, PKCS#1) or JWK format with WebCrypto, entirely offline. Scrypt Hash Generator Derive scrypt password hashes and keys with custom N, r, p and salt; output as hex, Base64 and common encoded formats. Self-Signed Certificate Generator Create a self-signed SSL/TLS certificate and RSA key for localhost, dev servers or internal tools. Generated locally with WebCrypto. SHA-1 Hash Generator Generate the SHA-1 hash of any text or file online. Instant 160-bit digest in hex, computed in your browser. SHA-2 Hash Generator Generate SHA-224, SHA-256, SHA-384, SHA-512, SHA-512/224 or SHA-512/256 hashes from text or files.