Generate a Solidity interface from a contract ABI JSON - functions, events, errors, and tuple structs. Runs entirely in your browser.
Generate a Solidity interface from a contract ABI JSON - functions, events, errors, and tuple structs. Runs entirely in your browser.
When you only have a contract's ABI (the JSON describing its functions and events), you often need a matching Solidity `interface` to call it from another contract. Writing that by hand is tedious and error-prone. This tool generates the interface for you from the ABI JSON, including struct definitions synthesized from tuple parameters. Inspired by abi-to-sol, it runs entirely in your browser.
Input:
[{ "type": "function", "name": "transfer", "inputs": [{ "name": "to", "type": "address" }, { "name": "amount", "type": "uint256" }], "outputs": [{ "type": "bool" }] }]Output:
interface IGenerated {
function transfer(address to, uint256 amount) external returns (bool);
}Does it handle tuples and structs?
Yes. Tuple parameters are converted into Solidity struct definitions, named from the ABI's internalType when present (e.g. struct Market.Order becomes Order), with nested tuples supported.
Why does my interface use 'memory' on parameters?
Reference types (strings, bytes, arrays, structs) require a data location. The generator uses 'memory', which is valid for external interface functions.
Can I change the interface name and pragma?
Yes. Both the interface name and the Solidity pragma version are editable fields.
Is my ABI uploaded anywhere?
No. Generation happens entirely in your browser - the ABI never leaves your device.