Solidity ABI Encoder / Decoder

Encode values into Ethereum ABI data, or decode calldata back into values, using a function signature or a list of types. A 4-byte selector is added or checked.

Use the tool

Why this tool exists

Every contract call carries calldata laid out by the ABI rules: a four-byte selector followed by 32-byte words, with offsets for dynamic types such as strings and arrays. Reading that by eye is painful, and building it by hand for a test or a signature check is error-prone.

Give this tool a signature like transfer(address,uint256) and a JSON array of values to get the full calldata, split into words. In decode mode, paste calldata and it returns the values, checking that the selector matches. It supports uintN and intN, address, bool, bytesN, bytes, string, arrays, fixed arrays and tuples. Custom errors, events and function overloading from a full ABI JSON are not handled.

How to use it

  1. Enter a function signature or a comma-separated list of types.
  2. For encoding, give the values as a JSON array. For decoding, paste the hex data.
  3. Copy the result and check the words against your contract.

Frequently asked questions

How are numbers entered?

Write large integers as strings, such as "1000000000000000000", to avoid precision loss in JSON. Addresses need 0x and 40 hex digits, and bytes values are hex strings.

What if I give only types, without a function name?

Then no selector is computed and the output is the plain encoded arguments. Decode mode can still skip four bytes if the data length suggests a selector.

Why does decoding report a selector mismatch?

The first four bytes of your data differ from the Keccak-256 hash of the signature you typed. Check the signature spelling, the types and any spaces.

Does it support full ABI JSON files?

No. Type names are written inline, for example (uint256,address)[]. Struct names from Solidity must be replaced by the tuple of their field types.