Solidity Error Decoder
Decode Solidity revert data into human-readable error messages. Supports Error(string), Panic(uint256) codes, and custom errors.
Solidity Panic Codes Reference
| Code | Description |
|---|---|
| 0x00 | Generic compiler panic |
| 0x01 | Assert condition failed |
| 0x11 | Arithmetic overflow or underflow |
| 0x12 | Division or modulo by zero |
| 0x21 | Conversion to invalid enum value |
| 0x22 | Incorrectly encoded storage byte array |
| 0x31 | Pop on empty array |
| 0x32 | Array index out of bounds |
| 0x41 | Too much memory allocated |
| 0x51 | Called zero-initialized function pointer |
Examples
How to Use This Solidity Error Decoder
This tool decodes Solidity revert data from failed Ethereum transactions into human-readable error messages. It automatically detects and decodes standard errors, panic codes, and custom errors.
- Get the revert data — copy the hex output from a failed transaction on Etherscan, from your development console, or from an eth_call RPC response.
- Paste the hex data into the input field. It should start with "0x" followed by the error selector and encoded parameters.
- View the decoded error — the tool identifies whether it is an Error(string), Panic(uint256), or custom error and displays the decoded message or parameters.
- For custom errors, optionally provide the error signature (e.g., "InsufficientBalance(uint256,uint256)") to get fully labeled parameter decoding.
All decoding runs locally in your browser. No error data is sent to any external server.
Common Use Cases
- Failed transaction debugging — Quickly understand why a transaction reverted by decoding the error data returned by the EVM.
- Smart contract development — Test and verify that your custom errors return the expected parameters during development and testing.
- User support — Decode error data from user reports to identify the root cause of failed transactions in your dApp.
- Panic code identification — Translate numeric Panic codes into meaningful descriptions like "arithmetic overflow" or "array out of bounds".
- Security analysis — Analyze revert data from exploit attempts to understand what checks failed and where.
Related Tools
Frequently Asked Questions
What is Solidity revert data?
When a Solidity transaction fails, the EVM returns revert data as a hex-encoded byte string. This data contains an error selector (first 4 bytes) followed by ABI-encoded error parameters. The standard Error(string) reverts include a human-readable message, while Panic(uint256) codes indicate specific runtime failures.
What are Solidity Panic codes?
Panic codes are standardized uint256 values returned when Solidity encounters runtime errors. Common codes include: 0x01 (assert failure), 0x11 (arithmetic overflow/underflow), 0x12 (division by zero), 0x21 (invalid enum value), 0x22 (storage encoding error), 0x31 (pop on empty array), and 0x32 (array index out of bounds).
What are custom errors in Solidity?
Custom errors (introduced in Solidity 0.8.4) allow developers to define named error types with parameters, like 'error InsufficientBalance(uint256 available, uint256 required)'. They use a 4-byte selector (same as functions) and are more gas-efficient than Error(string) reverts because they avoid storing the error string on-chain.
How do I decode a failed transaction's error?
Copy the revert data from the failed transaction (available on Etherscan under 'More Details' or from your RPC call response). Paste it into this tool. The decoder identifies the error type (Error, Panic, or custom error) and shows the decoded message or parameters in human-readable form.
Why does my transaction revert with no data?
A revert with empty data typically means the contract used a plain 'revert()' without a message, or the failure occurred in a low-level call (like a transfer to a contract without a receive function). It can also happen when calling a non-existent function on a contract that does not have a fallback function.
Related Tools & Guides
Try Also
ERC-20 Token Info Decoder
Decode ERC-20 token function calls and event logs from raw transaction data.
Keccak256 Hash Generator
Generate Keccak256 hashes from text input. The hash function used by Ethereum and Solidity.
Hex / Decimal Converter
Convert between hexadecimal and decimal numbers. Useful for Ethereum block numbers, values, and calldata.