EVM Calldata Decoder
Decode Ethereum transaction calldata from raw hex. Parse function selectors, decode ABI arguments, and understand what a transaction is doing.
Decode Calldata
Frequently Asked Questions
What is EVM calldata?▼
Calldata is the input data sent with an Ethereum transaction when calling a smart contract function. It's ABI-encoded: the first 4 bytes are the function selector (keccak256 hash of the function signature, first 4 bytes), followed by the ABI-encoded arguments. Understanding calldata is essential for debugging transactions and building EVM tooling.
What is a function selector?▼
A function selector is the first 4 bytes of the keccak256 hash of the function signature. For `transfer(address,uint256)`, the selector is `0xa9059cbb`. Ethereum uses selectors to route calls to the correct function in a contract. You can look up known selectors at 4byte.directory.
How is calldata ABI-encoded?▼
After the 4-byte selector, arguments are ABI-encoded as 32-byte slots. Static types (uint256, address, bool, bytes32) are right-padded or left-padded to 32 bytes. Dynamic types (string, bytes, arrays) have an offset pointer in the static section pointing to the dynamic data location. Addresses are 20 bytes left-padded to 32 bytes.
Why would calldata be 'raw' without a function selector?▼
Raw calldata without a selector appears in: fallback function calls, Ethereum transfer (empty calldata), some proxy patterns, and direct contract construction. In these cases, decode from offset 0 rather than offset 4.
How do I decode a failed transaction's calldata?▼
Get the transaction's `input` field from a block explorer (Etherscan, Basescan). Paste it here or use `cast calldata-decode` from Foundry. Knowing the function signature (from the contract ABI or 4byte.directory) is required for full decoding. The 4-byte selector alone tells you which function was called.
Related Products
on GumroadDeveloper Productivity Bundle
Stop rebuilding the same setup every project. 51 VSCode snippets, 40 Git aliases, 5 Docker Compose stacks, 5 GitHub Actions workflows, 5 README templates, and a dotfiles kit. Set up a professional dev environment in under an hour.
Buy on Gumroad →AI Prompt Engineering Toolkit
58 structured prompt templates for Claude, ChatGPT, and Gemini — organized by use case. Code Review, Debugging, Documentation, Architecture, and 10 model-specific tips. Stop writing prompts from scratch.
Buy on Gumroad →Developer Cheat Sheet Bundle
10 print-ready cheat sheets for the tools developers use every day: Git, Docker, Linux CLI, SQL, Regex, HTTP Status codes, VS Code shortcuts, Bash scripting, jq/JSON, and Markdown.
Buy on Gumroad →You Might Also Need
ABI Encoder/Decoder
Encode and decode Ethereum ABI data. Supports all Solidity types: uint, address, bool, bytes, string, arrays, tuples. Includes abi.encode and encodePacked.
Open free tool →
Smart Contract Gas Estimator
Estimate Ethereum smart contract gas costs in USD. Compare operation costs across mainnet, Arbitrum, Optimism, and Base L2 networks.
Open free tool →
Multi-Chain Wallet Address Validator
Validate cryptocurrency wallet addresses across Ethereum, Bitcoin, Solana, TRON, and EVM chains. Check EIP-55 checksum and detect address format.
Open free tool →
More Free Tools
Enjoying this tool? Get more like it.
Weekly developer tool guides, productivity playbooks & AI tricks. Free. No spam.
Unlock AI-Powered Dev Tools
- ⚡ AI Code Review, Doc Generator & SQL Builder
- ⚡ All premium templates & early access
- ⚡ Member discounts on Gumroad products
$9/mo after trial · Cancel anytime
Want the full toolkit?
Get DevPlaybook Pro
Every template, guide, boilerplate, and automation script in one bundle. 13 premium products — grab them all at once and save big.
MIT licensed · Instant download · No subscription
See what's included → Browse all deals →