Ethereum and Solidity rely on Keccak-256 for event topics, function selectors, and data integrity. The Keccak256 Hasher generates Solidity-compatible Keccak-256 hashes from UTF-8 text or hex input—so you can compute hashes for event topics, function selectors, or any keccak256 value during development or debugging.
What is Keccak256?
Keccak256 is a cryptographic hash function used in Ethereum for hashing data, generating unique identifiers, and ensuring data integrity in smart contracts. The tool accepts UTF-8 text or a hex string (with 0x) and outputs the hash, compatible with Solidity's keccak256(). All hashing is performed locally in your browser; no data is sent to any server. Use it to compute Solidity-compatible hashes for event topics, function selectors, or any keccak256 value. UTF-8 mode hashes plain text; hex mode hashes hex-encoded data—the hash depends on encoding. If your hash differs from Solidity, ensure input encoding matches (e.g. keccak256(abi.encodePacked(...)) may differ from raw UTF-8 or hex); use the same encoding as in your contract.
Key Features
- What it is — Keccak256 is used in Ethereum for hashing, identifiers, and data integrity in smart contracts.
- Input — UTF-8 text or hex string. Tool generates hash compatible with Solidity's keccak256().
- Privacy — All hashing is performed locally in your browser. No data is sent to any server.
- UTF-8 vs Hex — UTF-8 hashes plain text. Hex mode expects hex-encoded data (0x). Hash output depends on encoding.
- When to use — Event topics, function selectors, or any keccak256 during development or debugging.
- Hash differs — Ensure input encoding matches Solidity (e.g. abi.encodePacked vs raw UTF-8/hex). Use same encoding as in your contract.
How to Use the Keccak256 Hasher
- Open the Keccak256 Hasher tool.
- Enter input as UTF-8 text or hex string. Select mode if needed. Copy the hash.
- Use the "Use tool" button on the docs page if you are reading this from the documentation.
Real Use Cases
Why Use the Keccak256 Hasher Instead of Alternatives?
- vs. Checksum Address Generator — Checksum Address Generator uses Keccak-256 for EIP-55. This tool hashes arbitrary input. Use hasher for event/selector/custom; use checksum tool for addresses.
- vs. Address Validator — Address Validator validates address format. This tool hashes data. Use the right tool for the task.
- vs. Function Selector Generator — Function Selector Generator produces 4-byte selector from signature. This tool gives full Keccak-256. Use selector tool for calldata; use this for raw hash.
- vs. Generic hash tools — This tool is Solidity-compatible (Keccak-256). Use it for EVM/Solidity; use other hashers for SHA-256 etc. if needed.
Benefits for Smart Contract Developers
- Developers — Compute event topic0, function selectors, and custom hashes without running Solidity. Match contract encoding.
- Debugging — Verify hashes against contract or indexer. Ensure encoding matches.
Common Mistakes
- Hash differs from Solidity — Ensure input encoding matches: Solidity's keccak256(abi.encodePacked(...)) may differ from raw UTF-8 or hex. Use the same encoding as in your contract.
- Wrong mode — UTF-8 vs hex changes the hash. Choose the mode that matches your contract.
- Expecting address checksum — For EIP-55 address checksum use Checksum Address Generator.
- Forgetting to copy — Copy the hash before closing the tab.
Frequently Asked Questions
What is Keccak256?
Keccak256 is a cryptographic hash function used in Ethereum for hashing data, generating unique identifiers, and ensuring data integrity in smart contracts.
How do I use the Keccak256 hasher?
Enter your input as UTF-8 text or a hex string. The tool will instantly generate the Keccak256 hash, compatible with Solidity's keccak256() function.
No. All hashing is performed locally in your browser for maximum privacy and security.
UTF-8 mode hashes plain text directly. Hex mode expects hex-encoded data (starting with 0x). The hash output depends on the encoding.
When should I use the Keccak256 hasher?
Use it to compute Solidity-compatible hashes for event topics, function selectors, or any keccak256 value during development or debugging.
Why does my hash differ from Solidity?
Ensure input encoding matches: Solidity's keccak256(abi.encodePacked(...)) may differ from raw UTF-8 or hex. Use the same encoding as in your contract.
Keccak256 Hasher gives you Solidity-compatible hashes in one place: enter UTF-8 or hex, get hash. No server, no account. For addresses use Checksum Address Generator and Address Validator, for function selectors use Function Selector Generator.
Use the Keccak256 Hasher tool to generate Keccak-256 hashes.