Custom Error Selector Decoder
Free to download on every platform. Comes pre-installed on BotFone, BotPad and BotFlip — with extra free apps included.
About this app
WHAT IT DOES
Custom Error Selector Decoder takes the raw revert data from a failed Ethereum transaction — that cryptic hex string beginning with 0x and a 4-byte selector — and transforms it into a human-readable error with its full parameter list. Given a transaction hash (ideally one that reverted) or the raw error bytes directly, the tool extracts the error selector (the first 4 bytes of the revert data) and matches it against the contract's ABI. When a match is found, it decodes the remaining data into named parameters with their correct EVM types: addresses, integers, booleans, strings, bytes, arrays, and even nested tuples. The output shows the error name, the selector in hex, and every decoded parameter with its name, type, and value. No more guessing what "0x08c379a0" means — the tool tells you it is an "Error(string)" with the actual message.
HOW TO USE
Paste a transaction hash into the transaction input field — the tool will fetch the receipt, detect if it reverted, and extract the revert reason automatically. If your RPC does not expose revert reasons in the receipt (some nodes omit them), you can paste the raw error data directly into the raw input field. Optionally, paste the contract's ABI as a JSON array — this is required for custom errors; without it, the tool can only decode the standard Error(string) and Panic(uint256) built-in errors. Click "Decode from tx" to fetch and decode the revert from a transaction, or "Decode raw" to decode a hex string you provide. The result appears in the results card showing the error name, selector, and a parameter table.
THE REAL MECHANISM — why this beats guessing from etherscan
Most developers debug reverts by looking at the raw hex and trying to remember what error signature matches which selector. This tool automates the entire decoding pipeline using ethers.js's Interface. The key is the selector map: for every error in the provided ABI (or the built-in set of standard errors), the tool computes the keccak256 hash of the error signature "ErrorName(type1,type2,...)" and takes the first 4 bytes. This 4-byte selector becomes the lookup key. When you provide a transaction hash, the tool calls getTransactionReceipt; if the status is 0 (reverted), it reads the revertReason field from the receipt. For nodes that do not include revertReason, the tool falls back to letting you paste the raw data. Once the tool has the raw revert bytes, it slices the first 4 bytes to obtain the selector and looks it up in the map. If found, it uses the corresponding error fragment to decode the remaining bytes — handling all Solidity types including dynamic arrays and nested structures — and renders each parameter with its name and decoded value. The tool also distinguishes between built-in errors (which it knows without an ABI) and custom errors, and clearly marks when decoding fails due to a missing ABI.
WHAT IT CANNOT SEE
- Cannot decode custom errors without a matching ABI entry — the tool has no built-in knowledge of your project's custom errors unless you provide the ABI.
- Cannot distinguish between identical error selectors from different contracts — the selector is only 4 bytes, so collisions are theoretically possible; the tool assumes the ABI you provide is for the contract that reverted.
- Cannot recover original parameter names if the ABI is incomplete or uses generic names like "param0" — you will see the names exactly as they appear in the ABI.
- Cannot decode errors from contracts that are not verified and have no ABI provided — you must paste the ABI yourself.
- Cannot determine if a revert was intentional (a custom error) or an unexpected failure (like an out-of-gas or assertion) — it simply decodes whatever data is present.
- Cannot decode if the revert data is malformed or truncated — the tool will show a decode error.
- Cannot fetch ABIs from block explorers automatically in this version — you must paste the ABI.
- Cannot decode standard Error(string) messages if the revert data is not formatted as a standard Solidity error — some libraries use custom encoding.
PLEASE NOTE
This tool works exclusively on EVM-compatible chains (Ethereum, Goerli, Sepolia, Polygon, Arbitrum, Optimism, and any chain that supports standard eth_getTransactionReceipt). It does not support non-EVM chains. The tool is read-only — it never sends transactions. No data is stored remotely; all decoding happens in your browser. For best results, always provide the exact ABI of the contract that reverted; the error definitions are often found in the same ABI as the contract's functions.