Free, EVM native utility

ABI Encoder & Decoder

Encode Solidity parameter values into ABI bytes, or decode any EVM calldata back into typed values. Works for unverified contracts, raw transaction data, and event log inspection.

No loginWorks offlineTuples + arrays
ABI encode and decode flowTypes and values flow into ABI encoding and emerge as hex calldata; the reverse path decodes hex back into typed values.types + valuesaddress, uint256[0xfb..., 1000]ABI codec32 byte wordshex calldata0x000000...fb6916...

Encoded calldata bytes

0x000000000000000000000000fb6916095ca1df60bb79ce92ce3ea74c37c5d3590000000000000000000000000000000000000000000000000de0b6b3a7640000
Supported ABI types

All static types: address, bool, uintN, intN, bytesN. Dynamic types: string, bytes, T[], (T1, T2, ...). Parameter type syntax follows the official ABI spec via viem.parseAbiParameters.

About this tool

What this tool answers

The ABI Encoder & Decoder converts between Solidity parameter values and the hex calldata that travels on the EVM. Use it when reading raw transactions, debugging an unverified contract, building calldata by hand for a multisig, or sanity checking what your client library actually sent.

Etherscan can decode parameters only when a contract is verified. This tool needs only the parameter types you supply, so it works for any calldata: unverified contracts, MEV bot internals, internal calls inside a multisig batch, or hex pulled from a debug trace.

How to use it

Pick Encode or Decode at the top. In Encode mode, paste the parameter types as a comma separated string (for example, address, uint256) and the values as a JSON array. The tool returns the hex calldata bytes.

In Decode mode, paste the same types you expect plus the hex calldata. If the hex starts with a 4 byte function selector, drop the first 8 hex characters after the 0x to decode just the parameters. The tool returns a JSON array of decoded values, with bigints serialised as strings to preserve precision.

How the ABI codec works

The tool uses viem.encodeAbiParameters and decodeAbiParameters, which implement the official Solidity ABI spec. Static types occupy exactly 32 bytes each. Dynamic types (string, bytes, T[], tuples with dynamic members) place an offset in their slot and append the actual data after the static section.

All processing runs in your browser. There is no fetch, no third party request, no logging. The tool works fully offline once the page is loaded.

Where the encode and decode usually fail

The most common error is a type mismatch. If you encoded with uint256 but try to decode as uint128, the offsets shift and decoding either fails or returns wrong values. The types must match exactly.

The second is including or omitting the function selector. The 4 byte selector is not part of ABI encoded parameters; it sits in front of them. If you copied the full Etherscan input field, drop the first 8 hex chars after the 0x to decode parameters only. If you want to decode an entire call as a function, use the function signature workflow in the Keccak256 generator together with this tool.

When this tool is the right one

Use this tool any time you have hex bytes and need typed values, or typed values and need hex bytes. It is right for inspecting unverified contracts, building calldata for Gnosis Safe transactions, debugging client libraries, and writing test fixtures.

It is not the right tool when you need full transaction decoding (the function name and contract context too). For that, use a verified contract on Etherscan, or run a local trace with Tenderly or Foundry. The ABI codec only knows the parameter shape; it does not know the function name or which contract you called.

Tracking down a calldata bug?

Calldata mismatches between client libraries and contract expectations cause silent reverts and lost funds. Bring the trace for a focused review.

Book a smart contract review

Frequently asked questions

How do I ABI encode in Solidity?
Solidity exposes two builtin functions: abi.encode and abi.encodePacked. abi.encode pads each parameter to 32 bytes and prevents collisions across argument boundaries. abi.encodePacked concatenates without padding, which is shorter but can collide. For function calls, the EVM uses the standard ABI encoding with the function selector prepended. This online tool uses viem to mirror the exact bytes Solidity produces.
What is the difference between abi.encode and abi.encodePacked?
abi.encode produces standard ABI encoding with 32 byte padding and offset tables for dynamic types, which is what EVM calldata uses. abi.encodePacked produces a tight concatenation without padding. encodePacked is shorter but can produce hash collisions, for example encodePacked(string a, string b) and encodePacked(string c) can hash identically. Use abi.encode for hash inputs unless you have a specific reason for packed encoding.
How do I decode EVM calldata from a transaction?
Copy the input hex from the block explorer transaction details, switch to Decode mode in this tool, paste the parameter types from the function signature, and paste the hex. Drop the first 8 hex characters after 0x if you only want the parameters, or keep them if you want to verify the function selector too. The decoder returns a JSON array of decoded values in declaration order.
What is ABI encoding in plain terms?
ABI, the Application Binary Interface, is the rule for how Solidity types are packed into the bytes that travel on EVM calldata, return data, and event topics. The standard pads each static parameter to 32 bytes and uses an offset table for dynamic types such as string, bytes, and arrays. Every Ethereum tool that calls contracts has to encode and decode according to this rule.
Why does my decoded number look enormous?
Token amounts are stored as raw integer wei equivalents. A transfer of 1 USDC, which uses 6 decimals, shows as 1000000. A transfer of 1 ETH, which uses 18 decimals, shows as 1000000000000000000. To convert to a human readable number, divide the decoded value by 10 to the power of the token's declared decimals.
Can this online ABI encoder handle dynamic types like string and bytes?
Yes. The ABI spec handles string, bytes, T[], and tuples written as T1, T2, ... . The tool uses viem.parseAbiParameters which supports all standard ABI grammar. Pass the value as the natural JSON form: a string for string, a hex prefixed value for bytes, an array for arrays, an object or array for tuples and struct types.
How do I decode event logs with this ABI decoder?
Event logs are encoded with the same ABI rules but split between topics and data. Indexed parameters go into topics, non indexed parameters go into data. For an event Transfer(address indexed from, address indexed to, uint256 value), decode topics[1] and topics[2] as address values, and decode the data field with the non indexed types, which is uint256 in this case. The tool handles both encoding paths.

Related services and reading

Pair this tool with the other Solidity utilities.

Author: Mudassir Khan. Last updated May 9, 2026. ABI codec verified against viem 2.x reference vectors.