Encode a function call and its arguments into ABI calldata from a signature or contract ABI.
Loading tool
About Input Data Encoder
Build ABI-encoded calldata for a contract function. Paste a JSON ABI, a Hardhat/Foundry artifact or one signature per line, pick the function, and fill in each argument; arrays and tuples are entered as JSON. Arguments are validated against their Solidity types (address format, integer ranges, fixed bytes length) and the output shows the selector plus each encoded word.
Common uses
- Prepare calldata for a Safe multisig transaction or a governance proposal
- Craft raw input data to send with cast, a wallet's hex data field or eth_call
- Check how a tuple or dynamic array argument is laid out in ABI encoding
- Generate test fixtures for contract unit tests
FAQ
- How is Ethereum calldata encoded?
- Calldata is the 4-byte function selector (the first 4 bytes of keccak256 of the canonical signature) followed by the arguments encoded per the Solidity ABI spec. Static values take one 32-byte word each; dynamic types such as string, bytes and arrays are referenced by an offset and stored after the static part.
- How do I enter large uint256 values?
- Type them as plain decimal or 0x hex text. Inside JSON arrays or tuples, pass big integers as strings so they are not rounded by JavaScript number precision.
- How do I pass a struct (tuple) argument?
- Enter it as a JSON array in component order, or as a JSON object keyed by the component names.