ZH

ABI Encoder & Decoder

ABI Encoder Decoder builds calldata from a function signature and JSON args, or decodes input data into readable parameters. Runs in your local browser.

Function selector
0xa9059cbb
Full calldata (including function selector)
0xa9059cbb0000000000000000000000005aaeb6053f3e94c9b9a09f33669435e7ef1beaed0000000000000000000000000000000000000000000000000de0b6b3a7640000
Encoded arguments only
0x0000000000000000000000005aaeb6053f3e94c9b9a09f33669435e7ef1beaed0000000000000000000000000000000000000000000000000de0b6b3a7640000

Calculations and checks on this page run in your browser. Private keys and seed phrases are never uploaded to the server.

About this tool

ABI Encoder Decoder builds or parses Ethereum contract calldata: a 4-byte function selector plus ABI-encoded arguments—core for transaction review and integration tests.

Encode: supply a function signature and a JSON argument array to produce full 0x calldata. Decode: supply a signature and Input Data to restore each parameter.

Supported types include address, bool, integers, bytes, string and fixed/dynamic arrays. Tuple (struct) types are not covered in this version.

How to use

  1. Choose encode or decode mode.
  2. Enter a function signature such as transfer(address,uint256), or a type list only.
  3. Encode: pass a JSON array (quote large uint256 values as strings). Decode: paste 0x Input Data.
  4. Copy the result; decode warns if the selector does not match the signature.

FAQ

Where do I find Ethereum transaction Input Data?

On a block explorer under Input Data (Hex/Original), or in the wallet confirm screen under Data / hex.

Why must large integers be quoted in JSON for ABI encoding?

JSON numbers lose precision above about 2⁵³. On-chain uint256 amounts should be strings such as "1000000000000000000".

Is ABI decode always accurate?

It depends on the signature you provide. Selector collisions or proxy delegatecall paths need verified source and layout analysis.

Why are tuple struct parameters unsupported?

Nested/tuple serialization is complex; this version omits them to limit error rates. Use Foundry cast or similar CLIs for structs.

Related tools