Keccak-256 Hash Generator
Developer & Author — Egor VolchenkoThe Keccak-256 Hash Generator calculates a 256-bit hash from text or encoded bytes. Select UTF-8, Hex, or Base64 input, then copy the digest as hexadecimal or Base64 for development, testing, or data checks.
How to Use the Keccak-256 Hash Generator
Use this online Keccak-256 calculator to hash a text string or a sequence of bytes. The result is always a 256-bit digest; the output controls only change how that digest is displayed.
How to Generate a Keccak-256 Hash
- Type or paste a string into the Input text editor.
- Choose Input Encoding. Keep UTF-8 for ordinary text, or select Hex or Base64 when your input represents encoded bytes.
- Under Separator, select Hex (lower), Hex (UPPER), or Base64 for the Keccak-256 Hash Result. These choices change the displayed format, not the underlying digest.
- Leave Auto / Live enabled for live updates, or use Run to calculate the hash on demand.
- Read the digest in Keccak-256 Hash Result. Select Copy to copy it, or Clear to remove the input and reset the working area.
For example, with Input Encoding set to UTF-8, enter abc. The Keccak-256 digest in Hex (lower):
4e03657aea45a94fc7d47ba826c8d667c0d1e6e33a64a036ec44f58fa12d6c45Using HMAC-KECCAK_256
Turn on Enable HMAC-KECCAK_256 when you need a keyed message authentication code instead of a regular Keccak-256 digest. HMAC uses a secret key as well as the message, so its output differs from an unkeyed hash.
- Switch on Enable HMAC-KECCAK_256 and provide the required key if the tool displays a key-entry control.
- Enter your message in Input text, choose Input Encoding and an output format, then read the live result or press Run.
Turn the switch off to return to standard Keccak-256 hashing. HMAC-Keccak-256 is not interchangeable with the unkeyed keccak256() operation used in Ethereum contracts.
What Is Keccak-256?
Keccak-256 is a cryptographic hash function that produces a fixed 256-bit (32-byte) digest from input of any length. In hexadecimal form, that is 64 characters. The same sequence of bytes always produces the same result; changing even one byte generally changes the digest completely.
Keccak belongs to the sponge-based family of algorithms that led to SHA-3. Its original Keccak-256 variant is used in Ethereum-related systems, including smart contract development and cryptographic identifiers.
Keccak-256 vs. SHA3-256
Keccak-256 and the standardized SHA3-256 share the underlying Keccak permutation but use different domain-separation padding. They therefore produce different hashes for identical input. If a protocol, library, or test fixture specifies Keccak-256, substituting a SHA3-256 function will not give the expected result.
For a quick reference, Keccak-256 of the empty byte string is c5d2460186f7233c927e7db2dcc703c0e500b653ca82273b7bfad8045d85a470. The SHA3-256 result for the same empty input begins with a7ffc6f8.
Understanding UTF-8, Hex, and Base64 Input
The selected Input Encoding determines which bytes are hashed. In UTF-8 mode, entering 616263 hashes six text characters. In Hex mode, those characters represent the three bytes for abc. Likewise, YWJj in Base64 represents the same three bytes.
This distinction matters when reproducing known hashes. Use Hex or Base64 input for already-encoded binary data, and UTF-8 for normal text. Match the original data exactly, including whitespace, letter case, and line endings.
Keccak-256 for Ethereum and Development
Ethereum uses the original Keccak-256 variant rather than FIPS SHA3-256. This hash calculator can help reproduce a digest from known input bytes, check development examples, or compare text-based test values.
A smart contract may hash ABI-encoded or packed binary values instead of the characters shown on a screen. To match Solidity keccak256(), first ensure that you are hashing the same byte sequence as the contract; selecting the right algorithm alone is not enough.
Output Formats and Security Notes
Choose Hex (lower) or Hex (UPPER) when a system expects a 64-character hexadecimal digest, or Base64 when you need that same digest represented in Base64. Uppercase and lowercase hexadecimal are alternative spellings of identical bytes.
Important: Hashing is not encryption: there is no decryption step that recovers the original text. A plain Keccak-256 digest is also not a substitute for a dedicated password-hashing algorithm.
Frequently Asked Questions
No. Both use the Keccak permutation, but the standardized SHA3-256 algorithm has a different padding suffix. They produce different hashes for the same input, so you must choose the variant required by your application.
Hi! I’m a WordPress developer with over 10 years of experience. I love Tailwind CSS, clean code, and intuitive interfaces. I’m currently working on million.tools — a service with convenient online tools for everyday tasks. I’m building it from scratch with great attention to detail and user experience.