{"uid":"cap_1XU5G7U47C9hCI-d903dQ","slug":"web3-tools-keccak-256-hash-c4d80fc7","name":"Web3 Tools Keccak-256 Hash","description":"Keccak-256 hash (the Ethereum one) of text or hex bytes, with the first-4-byte selector and NIST SHA3-256 for contrast.","url":"https://web3-tools.x402tookit.com/keccak256?utm_source=zero.xyz","method":"GET","headers":{},"bodySchema":{"type":"object","$schema":"https://json-schema.org/draft/2020-12/schema","required":["input"],"properties":{"input":{"type":"object","required":["type","method"],"properties":{"type":{"type":"string","const":"http"},"method":{"enum":["GET"],"type":"string"},"queryParams":{"type":"object","required":["input"],"properties":{"input":{"type":"string","description":"The text, or hex bytes if encoding is hex"},"encoding":{"type":"string","description":"utf8 (default) or hex"}}}},"additionalProperties":false},"output":{"type":"object","required":["type"],"properties":{"type":{"type":"string"},"example":{"type":"object","properties":{"asOf":{"type":["null","string"]},"source":{"type":["null","string"]},"reasons":{"type":["array","null"],"items":{"type":"string"}},"summary":{"type":["null","string"]},"verdict":{"type":["null","string"]},"degraded":{"type":["boolean","null"]},"encoding":{"type":["null","string"]},"sha3_256":{"type":["null","string"]},"keccak256":{"type":["null","string"]},"disclaimer":{"type":["null","string"]},"inputBytes":{"type":["null","number"]},"notChecked":{"type":["array","null"],"items":{"type":"string"}},"first4Bytes":{"type":["null","string"]}}}}}}},"responseSchema":null,"example":null,"exampleRequest":null,"tags":["x402"],"displayCostAmount":"0.02","displayCostAsset":"USDC","priceDynamic":false,"priceHint":null,"priceStatus":"priced","priceSource":"probe","requiresHandshake":false,"reviewCount":0,"rating":{"score":"0.00","successRate":"0.00","reviews":0,"stars":null,"state":"unrated"},"availabilityStatus":"down","priceObserved":null,"sessionDeposit":null,"pricing":{"kind":"static","summary":"$0.02/call","primary":{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"},"accepted":[{"kind":"static","protocol":"x402","network":"base","amountUsd":"0.02","per":"call","confidence":"exact"}]},"paymentMethods":[{"uid":"pm_dQunLjorx79kMnpRYDek7","protocol":"x402","methodType":"crypto","chain":"base","mode":"charge","costAmount":"0.02","costPer":"request","priority":0,"asset":"0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913","unit":"request","depositMicros":null,"planRef":null}],"brandName":null,"brandSlug":null,"brandBaseUrl":null,"brandDocsUrl":null,"whatItDoes":"Computes the Keccak-256 hash of text or hex bytes, returning the hash, the first 4 bytes (function selector), and NIST SHA3-256 for comparison.","exampleAgentPrompt":"Can you compute the Keccak-256 hash of the text 'transfer(address,uint256)' and also show me the first 4-byte selector and the NIST SHA3-256 for comparison?","exampleUseCases":[{"title":"Derive Solidity function selector","prompt":"What's the Keccak-256 hash of 'approve(address,uint256)' so I can get the 4-byte function selector for my ABI encoding?"},{"title":"Hash hex bytes for EVM calldata","prompt":"Hash these hex bytes using Keccak-256: 0xdeadbeef — treat the input as hex encoding, and show me the first 4 bytes too."},{"title":"Compare Keccak-256 vs SHA3-256","prompt":"I need to see the difference between Keccak-256 and standard NIST SHA3-256 for the string 'hello world' — can you run both?"}],"resultDescription":"Returns the full 32-byte Keccak-256 hash as a hex string, the first 4 bytes of that hash (useful as an EVM function selector), the NIST SHA3-256 hash of the same input for contrast, the number of input bytes processed, and the encoding used. May also include source/timestamp metadata and disclaimer fields.","failureModes":["Missing required 'input' query parameter returns an error","Invalid hex string when encoding=hex causes a parse error","Empty input may return a hash of empty bytes rather than an error","Unsupported encoding value (not utf8 or hex) may return a validation error","Payment failure (x402) prevents the call from completing"],"whenToPreferThis":"Use this endpoint when you need the Ethereum-flavored Keccak-256 hash specifically (not standard NIST SHA3-256), especially for computing EVM function selectors, event topic hashes, or verifying ABI encoding. Prefer this over general SHA3 tools when the distinction between Keccak-256 and NIST SHA3-256 matters, and when you want both values side-by-side for comparison.","instructions":null,"reviewSummary":null,"reviewSummaryHighlights":null,"reviewSummaryConcerns":null,"reviewSummaryGeneratedAt":null,"activationCount":0,"lastUsedAt":null,"lastSuccessfullyRanAt":null,"lastHealthCheckAt":"2026-10-23T08:22:40.733Z","isFirstParty":false,"canonicalSlug":"web3-tools-keccak-256-hash-c4d80fc7"}