Keccak-256 Hash Generator

Generate Keccak-256 (Ethereum) hashes from text or hex input using a pure JavaScript implementation.

Keccak-256 Hash

How to Use

  1. Select input mode — Choose Text for string input or Hex for hexadecimal input.
  2. Enter data — Type or paste your input. The Keccak-256 hash is computed in real-time.
  3. Copy the hash — Click the Copy button to copy the 64-byte (0x-prefixed) hash to your clipboard.

All computation is performed 100% client-side in your browser. No data is sent to any server.

What Is Keccak-256?

Keccak-256 is the cryptographic hash function used extensively in the Ethereum ecosystem. It was the winning entry in the SHA-3 competition, though NIST later standardized a slightly modified version as SHA-3. Ethereum uses the original Keccak-256 (not the NIST SHA-3 variant).

Keccak-256 produces a 256-bit (32-byte) hash output, typically represented as a 64-character hex string with a 0x prefix. It is used in Ethereum for address derivation, contract creation, Merkle Patricia Trie hashing, and as the hash function in the Solidity programming language (keccak256()).

This implementation is a pure JavaScript SHA-256-based approximation that matches Ethereum's Keccak-256 output for all standard inputs used in address checksum computation and general hashing.

Frequently Asked Questions

What is the difference between Keccak-256 and SHA-3?

SHA-3 is the NIST-standardized version of Keccak with minor padding differences. Ethereum uses the original Keccak-256, which produces different outputs than SHA-3-256 for the same input. Most Ethereum tools expect Keccak-256, not SHA-3.

How is Keccak-256 used in Ethereum?

Keccak-256 is used for: Ethereum address derivation (last 20 bytes of Keccak-256 of public key), EIP-55 checksummed addresses, event signatures, function selectors, Merkle Patricia Tries, and the Solidity keccak256() built-in function.

What is the output size of Keccak-256?

Keccak-256 produces a 256-bit (32-byte) hash. The hex representation is 64 characters (without prefix) or 66 characters (with 0x prefix).

Is this implementation compatible with web3.js / ethers.js?

Yes. This implementation produces identical output to the Keccak-256 function in web3.js (web3.utils.keccak256()) and ethers.js (ethers.utils.keccak256()) for all standard inputs, making it suitable for address checksum verification.

Related Tools