Inspect & decode · ABI encoding
ABI encoder
Turn function arguments into the hex bytes a contract call expects.
Build the call
Everything runs in this tab. Nothing is uploaded and no wallet is involved.
A JSON array of either full ABI entries or human-readable signatures like ["function transfer(address,uint256)"].
Just the name, e.g. transfer. Add the full signature if the contract has overloads.
A JSON array in the order the function declares them. Use [] for a function that takes none.
The calldata appears here
Paste an ABI, name a function and give it arguments. The four-byte selector and the full hex blob update as you type.
About this tool
ABI encoding is how Ethereum packs a function call into bytes: a 4-byte function selector, taken from the keccak256 hash of the function signature, followed by the arguments in 32-byte words. Paste a contract ABI, name the function and give its arguments, and this tool builds the calldata with ethers.js. Switch to Hex to arguments to decode calldata back into named values.
Common questions
What is a function selector?
It is the first 4 bytes of the keccak256 hash of a function's signature. For transfer(address,uint256) it is 0xa9059cbb. A contract reads it to decide which function to run.
What is the difference between abi.encode and abi.encodePacked?
abi.encode pads every value to 32 bytes and is the encoding contract calls use, which is what this tool produces. abi.encodePacked joins values without padding, which is shorter but can be ambiguous, and is mainly used for hashing.
Can I paste human-readable function signatures instead of a JSON ABI?
Yes. The ABI field takes a JSON array of full ABI entries, or of signatures such as "function transfer(address to, uint256 amount)".