Keccak-256 Hash Calculator
Calculate Keccak-256 hashes from text, files, Hex, or Base64 input. The 256-bit digest updates as you type and is displayed as 64 hexadecimal characters. Hashing runs locally in your browser.
Drag and drop a file here or click to select
What is Keccak-256?
Keccak-256 is a cryptographic hash function based on the Keccak sponge construction. It produces a fixed 256-bit (32-byte) digest for any input length. Keccak was selected as the basis for the SHA-3 standard, but the original Keccak-256 and standardized SHA3-256 use different domain-separation padding and produce different results.
Keccak-256 is used in Ethereum for transaction and data hashing, address derivation, and function selectors. It is a one-way function: a digest cannot feasibly be reversed to recover an arbitrary original input.
Keccak-256 vs. SHA3-256
| Feature | Keccak-256 | SHA3-256 |
|---|---|---|
| Output | 256 bits (64 hex characters) | 256 bits (64 hex characters) |
| Construction | Keccak-f[1600] sponge | Keccak-f[1600] sponge |
| Domain-separation suffix | 0x01 | 0x06 |
| Same hash for identical input? | No | No |
| Typical usage | Ethereum ecosystem | Standardized SHA-3 applications |
Do not substitute SHA3-256 for Keccak-256 when implementing Ethereum-compatible hashing. Although both output 256 bits, their digests differ.
Example Keccak-256 hashes
| Input text | Keccak-256 digest |
|---|---|
| Empty string | c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470 |
abc | 4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45 |
How to use this calculator
- Type or paste text into the Input text field. The Keccak-256 hash updates as you type.
- To hash raw bytes instead of text, change Input type to Hex or Base64.
- To hash a file, drag it into the file drop zone or click the zone to choose a file.
- Select Copy Keccak-256 hash to copy the 64-character hexadecimal result. Uppercase output and Base64 output change the format.
- To compare with a published checksum, turn on Verify hash and paste the expected Keccak-256 hash.
Text is encoded as UTF-8 before hashing. Hashes are calculated locally in your browser, and your input is not saved.
Keccak-256 test example
Use these values to check this calculator or any other Keccak-256 tool. Select Try to load an example into the calculator above.
| Input | Input type | Keccak-256 hash | Try |
|---|---|---|---|
hello | Text | 1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8 | |
68656c6c6f | Hex | 1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8 | |
aGVsbG8= | Base64 | 1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8 | |
Hello | Text | 06b3dfaec148fb1bb2b066f10ec285e7c9bf402ab32aa78a5d38e34566810cd2 | |
hello followed by Enter | Text | 1d63660020a5b5062fb35d9f82afa81581442281c43343763ab1d340e9861bae | |
hello 😀 | Text | 05fc2a8d51362ab194b5fbcada1ff32e9fb0ecea7834daa775313f7a595ba0f4 | |
68656c6c6f20f09f9880 | Hex | 05fc2a8d51362ab194b5fbcada1ff32e9fb0ecea7834daa775313f7a595ba0f4 |
The first three rows are the same five bytes written as text, Hex, and Base64, so they produce the same hash. A single uppercase letter or a trailing newline produces a completely different hash. The last two rows show the UTF-8 conversion: the 😀 emoji is 4 bytes (f0 9f 98 80).
Calculate Keccak-256 in code
Operating systems have no built-in Keccak-256 command. In JavaScript, use an Ethereum library such as ethers.js:
import { keccak256, toUtf8Bytes, id } from 'ethers';
import { readFileSync } from 'node:fs';
// Text, encoded as UTF-8
console.log(keccak256(toUtf8Bytes('hello')));
// 0x1c8aff950685c2ed4bc3174f3472287b56d9517b9c948127319a09a7a36deac8
// id() is a shortcut for the same text hash, often used for event signatures
console.log(id('hello'));
// Raw bytes written as hex, like the Hex input type
console.log(keccak256('0x68656c6c6f'));
// File
console.log(keccak256(readFileSync('file.bin')));
ethers.js adds a 0x prefix to the result. You can paste it into Verify hash with or without the prefix.
Python's hashlib.sha3_256 and Node.js crypto.createHash('sha3-256') calculate SHA3-256, not Keccak-256, so their results differ. See Keccak-256 vs. SHA3-256.
Security considerations
Keccak-256 is suitable for cryptographic hashing when the protocol explicitly requires it. It is not encryption and cannot be decrypted. It is also not suitable by itself for password storage: use a password-hashing function such as Argon2id, bcrypt, or scrypt instead.
Choose the input type carefully. In Text mode, typing 0x1234 hashes those six text characters. In Hex mode, it hashes the two bytes 12 34, which is usually what Ethereum tools expect for raw data.
Frequently asked questions
Can a Keccak-256 hash be reversed?
No practical method can recover an arbitrary original input from its hash. Short or predictable inputs can still be guessed and checked.
Related tools
- SHA-256 hash calculator — Calculate SHA-2 hashes for general-purpose integrity checks.
- SHA-2 hash calculator — Compare SHA-2 digest variants.
- SHA-512 hash calculator — Generate 512-bit SHA-2 digests.
Last updated: