Keccak-256 Hash Generator

Generate Keccak-256 hashes instantly — the hash function Ethereum uses for addresses, function selectors, event topics and state tries. Hash UTF-8 text or raw hex bytes, and enter a Solidity signature such as transfer(address,uint256) to get its four-byte selector. This is the original Keccak with 0x01 padding, not NIST SHA3-256, so it matches Solidity, ethers.js and web3.js. Everything runs in your browser.

Input

Text is UTF-8 encoded before hashing, matching Solidity’s keccak256(bytes).

Keccak-256 Hash

Algorithm: Keccak-256 (original padding, as used by Ethereum)

Output Format: 64-digit hexadecimal (256 bits)

Convert text characters to hexadecimal numbers.

Convert hexadecimal numbers to text characters.

Convert UTF8 characters to hexadecimal numbers.

Convert hexadecimal numbers to UTF8 characters.

Generate SHA-256 cryptographic hashes for text and files with client-side processing.

Generate cryptographically secure Base64, hex, and alphanumeric keys for APIs, JWTs, and encryption.

What is Keccak-256?

Keccak-256 is the cryptographic hash function used throughout Ethereum. It takes an input of any length and produces a fixed 256-bit digest, written as 64 hexadecimal characters. Ethereum uses it to derive addresses from public keys, to compute function selectors and event topics, to build Merkle-Patricia tries, and to hash transaction and block data.

Example:

Input: "abc"

Keccak-256: 4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45

Keccak-256 is not SHA3-256

This trips people up constantly. Ethereum adopted Keccak before it was standardised, and when NIST published SHA-3 in 2015 they changed the padding rule — from 0x01 to 0x06. Everything else is identical, but that one byte means the two functions produce completely different digests for the same input.

Solidity's keccak256(), ethers.js, web3.js and this tool all implement the original Keccak. If a library gives you a different answer, check whether it is actually doing SHA3-256.

Keccak-256("") = c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470

SHA3-256("") = a7ffc6f8bf1ed76651c14756a061d662f580ff4de43b49fa82d80a4b80f8434a

Function selectors and event topics

A Solidity function selector is the first four bytes of the Keccak-256 hash of its signature — the function name and parameter types, with no spaces and no argument names. Enter a signature above and this tool shows the selector automatically.

transfer(address,uint256) → 0xa9059cbb

approve(address,uint256) → 0x095ea7b3

balanceOf(address) → 0x70a08231

Event topics work the same way but use the full 32-byte hash rather than the first four bytes. Transfer(address,address,uint256) hashes to ddf252ad…523b3ef, the topic0 you see on every ERC-20 transfer log.

Text mode or hex mode?

Text (UTF-8) encodes what you type as UTF-8 bytes and hashes those. This is what you want for function signatures, event signatures and plain strings — it matches Solidity's keccak256(bytes("...")).

Hex bytes decodes your input as raw bytes first. Use it when the data is already binary — an address, packed ABI data, calldata, or a hash you are re-hashing. Hashing the text "0xdeadbeef" and hashing the four bytes de ad be ef give entirely different results, which is a common source of mismatched hashes.

Everything runs in your browser. Nothing you enter is sent to a server.


Have feedback or questions?

Please, do let us know and we'll see what we can do for you.

0/2000