Security tools

Keccak-256 hash

Compute a Keccak-256 digest of any file, on your device.

Runs on your device. The file is never uploaded.

Keccak-256 hash prints 256 bits as 64 lowercase hex characters, using the original padding that Ethereum's keccak256 depends on. hash-wasm's keccak is asked for 256 bits and nothing else. The digest arrives bare, with no 0x prefix, so anywhere that expects one needs it typed in by hand.

Input

Questions

Is Keccak-256 the same as SHA3-256?

No, and this trips people up constantly. Both use the Keccak permutation and both output 256 bits, but SHA-3 as standardised in FIPS 202 appends a domain separation suffix before padding. That single change makes every digest different. Older software and most of the Ethereum ecosystem use this original Keccak version.

Is this what Ethereum uses?

Yes. Ethereum keccak256, the function behind selectors, event topics and address derivation, is original Keccak-256, which is exactly what this tool computes through hash-wasm keccak with a 256-bit size. Compute the same input with a SHA3-256 tool and you get a different value that will not match anything your contract produced.

How long is the digest?

256 bits, printed as 64 lowercase hex characters with no 0x prefix. If you are pasting the value somewhere that expects one, add it yourself. The digest sits on the line after the title and your file name, and there are no options to set, so the same bytes always give the same result.

Why does my value differ from a contract or a web tool?

Almost always because the bytes differ, not the algorithm. This tool hashes the exact contents of the file you give it, and text editors love to add a trailing newline, which changes the digest completely. Make sure the file holds exactly the bytes you meant, with no newline and no BOM.

Does this give me an Ethereum address?

No. It computes one Keccak-256 digest of the file you give it and stops there. Deriving an address means hashing a public key and taking a specific slice of the result, and turning that into a checksummed address is another step again. This tool does neither of those for you.

Related Security tools