Ethereum ABI decoder (transaction input data)

Decode the input data of an Ethereum transaction with a contract ABI (JSON or Solidity signatures): function, arguments, addresses with checksum

loading Ethereum ABI decoder (transaction input data)
About this tool

Reading Ethereum transaction input with an ABI

When you call a smart contract on Ethereum or an EVM-compatible chain, the transaction carries a block of bytes called input data, or calldata. It begins with a 4-byte function selector, the first four bytes of the Keccak-256 hash of the function signature, such as transfer(address,uint256). The rest holds the arguments, encoded in the Solidity ABI format as 32-byte words: static values like addresses and integers sit directly in the data, while dynamic values such as strings, byte arrays and dynamic arrays are placed after the head, referenced by offsets and lengths. Block explorers show this as a long hexadecimal string, which is unreadable unless you know the contract interface, called the ABI.

This decoder takes the hex input data and an ABI and tells you what was called and with which arguments. The ABI can be pasted as JSON, as exported by compilers and explorers, or as human-readable lines such as function transfer(address to, uint256 amount). It supports unsigned and signed integers, booleans, addresses (shown with the EIP-55 mixed-case checksum), fixed and dynamic byte types, strings, arrays, fixed-size arrays and nested tuples. A second mode decodes the return value of a call (the data that eth_call returns) with the outputs of a function you choose.

The tool only reads the bytes you paste. It does not connect to a node, does not query a block explorer and does not use any online signature database. If you leave the ABI empty, it can still recognise about thirty common functions of tokens, NFTs and routers by their selector (for example transfer, approve, balanceOf or a Uniswap-style swap), but argument names will be empty, and anything else is shown as raw 32-byte words. That is also the main limit: with no ABI there is no way to know what an unknown selector meant. Nothing is uploaded, so you can decode transactions of private or unreleased contracts.

How to decode a call

  1. Pick what to decode: Transaction input or Call result.
  2. Paste the data, starting with 0x. For a transaction, the first eight hex digits after 0x are the selector. The page opens with a sample ERC-20 transfer loaded.
  3. Paste the ABI in the second box, as JSON or as signatures one per line. Only the functions are used. Events, errors and the constructor are ignored.
  4. Read the result: the function name and signature, the selector, and each argument with its type and value. Arrays and tuples are expanded into children. Copy the decoded values as JSON if you need them elsewhere.
  5. For Call result, choose the function that returned the data so the tool knows which output types to apply.
  6. If the selector is not in the ABI, the tool says so and lists the 32-byte words of the data so you can inspect them by hand.

Examples

An ERC-20 transfer

Input data:

0xa9059cbb0000000000000000000000005aaeb6053f3e94c9b9a09f33669435e7ef1beaed00000000000000000000000000000000000000000000000000000000000f4240

With the ABI line function transfer(address to, uint256 amount) returns (bool), the result is the function transfer(address,uint256), selector a9059cbb, to = 0x5aAeb6053F3E94C9b9A09f33669435E7Ef1BeAed and amount = 1000000. If the token uses 6 decimals, that is exactly 1.0 token; if it uses 18, it is a tiny amount. The ABI does not know decimals, so check the token contract.

The same data without an ABI

Leave the ABI empty and the selector a9059cbb is still recognised as transfer(address,uint256). The arguments are decoded with the same values, but their names are blank.

Dynamic data

For function setName(string name, uint256[] ids), the selector is 042ea1d2. A call with the string hello and the list 7, 9 is decoded as name = hello and ids = [7, 9], with children [0] = 7 and [1] = 9. The tool follows the offsets for you.

A return value

Decoding the 32 bytes 0x…0001 with the outputs of transfer gives a single bool equal to true.

Other selectors

transfer(address,uint256)   a9059cbb
approve(address,uint256)    095ea7b3
balanceOf(address)          70a08231

An unknown selector

Data starting with 0x12345678 and no matching function is reported as "No function in the ABI has this selector", followed by the 32-byte words.

Common mistakes

  • Pasting the whole transaction. Only the input data field is decoded, not the raw signed transaction or the transaction hash.
  • A truncated hex string. If the data ends early, the tool says it ends at a given byte and that it is incomplete or the ABI is wrong. Copy the full value from the explorer, not the shortened display.
  • Using the wrong ABI. If lengths or offsets point outside the data, the ABI does not match the call. Proxy contracts often need the ABI of the implementation, not of the proxy.
  • Odd or non-hex characters. The data must be 0x followed by pairs of hexadecimal digits.
  • Expecting names without an ABI. Parameter names are not stored on chain. Without an ABI they are blank.
  • Forgetting token decimals. Amounts are raw integers. Divide by 10 to the power of the token's decimals to get a human amount.

Frequently asked questions

Does it look up the function name online?

No. It does not query a node, explorer or signature database. It only matches the selector against the functions of your ABI, or against a short built-in list of common signatures.

Are the addresses checksummed?

Yes, they are shown with the EIP-55 mixed-case checksum computed locally.

Can it decode event logs?

This version decodes function input and return data. Events are not decoded.

Does it send my transaction data anywhere?

No. Everything is decoded in your browser.

How do I convert the big numbers to something readable?

Use the base converter for hex and decimal, or the hex text converter to see whether a byte string is readable text.

Report a problem