Solidity Function Selector
Calculate the 4-byte selector for any Solidity function signature, or decode a selector from calldata back to a known signature — all client-side using keccak256.
Function Selector Calculator
Compute the 4-byte function selector from a Solidity function signature. The selector is the first 4 bytes of the Keccak-256 hash of the canonical signature.
0xa9059cbb0xa9059cbb2ab09eb219583f4a59a5d0623ade346d962bcd4e46b11da047c9049bCommon Examples
The selector is used in the first 4 bytes of transaction calldata to identify which function to call.
Decode a Selector — Reverse Lookup
Paste a 4-byte selector (or full calldata — the first 4 bytes are used) to find matching function signatures in the built-in database of common ERC-20, ERC-721, ERC-1155, proxy, DeFi, and OpenZeppelin error signatures.
4-Byte Selector Reference Table
Common selectors computed from their canonical signatures — filter by name or hex.
| Selector | Signature |
|---|---|
| 0x79ba5097 | acceptOwnership() |
| 0x6697b232 | AccessControlBadConfirmation() |
| 0xe2517d3f | AccessControlUnauthorizedAccount(address,bytes32) |
| 0xe8e33700 | addLiquidity(address,address,uint256,uint256,uint256,uint256,address,uint256) |
| 0xf305d719 | addLiquidityETH(address,uint256,uint256,uint256,address,uint256) |
| 0x0d582f13 | addOwnerWithThreshold(address,uint256) |
| 0x3b3b57de | addr(bytes32) |
| 0x9996b315 | AddressEmptyCode(address) |
| 0xcd786059 | AddressInsufficientBalance(address) |
| 0xf851a440 | admin() |
| 0x252dba42 | aggregate((address,bytes)[]) |
| 0x82ad56cb | aggregate3((address,bool,bytes)[]) |
| 0x174dea71 | aggregate3Value((address,bool,uint256,bytes)[]) |
| 0xdd62ed3e | allowance(address,address) |
| 0x1e3dd18b | allPairs(uint256) |
| 0x574f2ba3 | allPairsLength() |
| 0x095ea7b3 | approve(address,uint256) |
| 0x38d52e0f | asset() |
| 0x00fdd58e | balanceOf(address,uint256) |
| 0x70a08231 | balanceOf(address) |
| 0x4e1273f4 | balanceOfBatch(address[],uint256[]) |
| 0x6c0360eb | baseURI() |
| 0x59659e90 | beacon() |
| 0xc3077fa9 | blockAndAggregate((address,bytes)[]) |
| 0x89afcb44 | burn(address) |
| 0x42966c68 | burn(uint256) |
| 0x79cc6790 | burnFrom(address,uint256) |
| 0x355274ea | cap() |
| 0x56781388 | castVote(uint256,uint8) |
| 0x7b3c71d3 | castVoteWithReason(uint256,uint8,string) |
| 0x8f283970 | changeAdmin(address) |
| 0x694e80c3 | changeThreshold(uint256) |
| 0x4e71d92d | claim() |
| 0x2e7ba6ef | claim(uint256,address,uint256,bytes32[]) |
| 0xbc1c58d1 | contenthash(bytes32) |
| 0x07a2d13a | convertToAssets(uint256) |
| 0xc6e6f592 | convertToShares(uint256) |
| 0xc9c65396 | createPair(address,address) |
| 0x313ce567 | decimals() |
| 0xa457c2d7 | decreaseAllowance(address,uint256) |
| 0xd0e30db0 | deposit() |
| 0x6e553f65 | deposit(uint256,address) |
| 0x7284e416 | description() |
| 0xe009cfde | disableModule(address,address) |
| 0x3644e515 | DOMAIN_SEPARATOR() |
| 0x008cc262 | earned(address) |
| 0xf645eedf | ECDSAInvalidSignature() |
| 0xfce698f7 | ECDSAInvalidSignatureLength(uint256) |
| 0xd78bce0c | ECDSAInvalidSignatureS(bytes32) |
| 0x610b5925 | enableModule(address) |
| 0xd93c0665 | EnforcedPause() |
| 0x03dee4c5 | ERC1155InsufficientBalance(address,uint256,uint256,uint256) |
| 0x3e31884e | ERC1155InvalidApprover(address) |
| 0x5b059991 | ERC1155InvalidArrayLength(uint256,uint256) |
| 0xced3e100 | ERC1155InvalidOperator(address) |
| 0x57f447ce | ERC1155InvalidReceiver(address) |
| 0x01a83514 | ERC1155InvalidSender(address) |
| 0xe237d922 | ERC1155MissingApprovalForAll(address,address) |
| 0xfb8f41b2 | ERC20InsufficientAllowance(address,uint256,uint256) |
| 0xe450d38c | ERC20InsufficientBalance(address,uint256,uint256) |
| 0xe602df05 | ERC20InvalidApprover(address) |
| 0xec442f05 | ERC20InvalidReceiver(address) |
| 0x96c6fd1e | ERC20InvalidSender(address) |
| 0x94280d62 | ERC20InvalidSpender(address) |
| 0x64283d7b | ERC721IncorrectOwner(address,uint256,address) |
| 0x177e802f | ERC721InsufficientApproval(address,uint256) |
| 0xa9fbf51f | ERC721InvalidApprover(address) |
| 0x5b08ba18 | ERC721InvalidOperator(address) |
| 0x89c62b64 | ERC721InvalidOwner(address) |
| 0x64a0ae92 | ERC721InvalidReceiver(address) |
| 0x73c6ac6e | ERC721InvalidSender(address) |
| 0x7e273289 | ERC721NonexistentToken(uint256) |
| 0x08c379a0 | Error(string) |
| 0xc04b8d59 | exactInput((bytes,address,uint256,uint256,uint256)) |
| 0x414bf389 | exactInputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160)) |
| 0xf28c0498 | exactOutput((bytes,address,uint256,uint256,uint256)) |
| 0xdb3e2198 | exactOutputSingle((address,address,uint24,address,uint256,uint256,uint256,uint160)) |
| 0x6a761202 | execTransaction(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,bytes) |
| 0x468721a7 | execTransactionFromModule(address,uint256,bytes,uint8) |
| 0x134008d3 | execute(address,uint256,bytes,bytes32,bytes32) |
| 0x2656227d | execute(address[],uint256[],bytes[],bytes32) |
| 0x8dfc202b | ExpectedPause() |
| 0xc45a0155 | factory() |
| 0xd6bda275 | FailedCall() |
| 0x1425ea42 | FailedInnerCall() |
| 0xddca3f43 | fee() |
| 0x017e7e58 | feeTo() |
| 0x094b7415 | feeToSetter() |
| 0x490e6cbc | flash(address,uint256,uint256,bytes) |
| 0x85f8c259 | getAmountIn(uint256,uint256,uint256) |
| 0x054d50d4 | getAmountOut(uint256,uint256,uint256) |
| 0x1f00ca74 | getAmountsIn(uint256,address[]) |
| 0xd06ca61f | getAmountsOut(uint256,address[]) |
| 0x081812fc | getApproved(uint256) |
| 0xf8b2cb4f | getBalance(address) |
| 0xf27a0c92 | getMinDelay() |
| 0xa0e67e2b | getOwners() |
| 0xe6a43905 | getPair(address,address) |
| 0x0902f1ac | getReserves() |
| 0x3d18b912 | getReward() |
| 0x248a9ca3 | getRoleAdmin(bytes32) |
| 0x9a6fc8f5 | getRoundData(uint80) |
| 0xe75235b8 | getThreshold() |
| 0xd8d11f78 | getTransactionHash(address,uint256,bytes,uint8,uint256,uint256,uint256,address,address,uint256) |
| 0x2f2ff15d | grantRole(bytes32,address) |
| 0x91d14854 | hasRole(bytes32,address) |
| 0x5c60da1b | implementation() |
| 0x39509351 | increaseAllowance(address,uint256) |
| 0x8129fc1c | initialize() |
| 0x485cc955 | initialize(address,address) |
| 0xf92ee8a9 | InvalidInitialization() |
| 0xe985e9c5 | isApprovedForAll(address,address) |
| 0x9e34070f | isClaimed(uint256) |
| 0x2d9ad53d | isModuleEnabled(address) |
| 0x2f54bf6e | isOwner(address) |
| 0x7464fc3d | kLast() |
| 0x50d25bcd | latestAnswer() |
| 0xfeaf968c | latestRoundData() |
| 0x1a686502 | liquidity() |
| 0x402d267d | maxDeposit(address) |
| 0xc63d75b6 | maxMint(address) |
| 0xd905777e | maxRedeem(address) |
| 0xce96cb77 | maxWithdraw(address) |
| 0x40c10f19 | mint(address,uint256) |
| 0x6a627842 | mint(address) |
| 0x94bf804d | mint(uint256,address) |
| 0xac9650d8 | multicall(bytes[]) |
| 0x5ae401dc | multicall(uint256,bytes[]) |
| 0x06fdde03 | name() |
| 0x691f3431 | name(bytes32) |
| 0xaffed0e0 | nonce() |
| 0x7ecebe00 | nonces(address) |
| 0xd7e6bcf8 | NotInitializing() |
| 0x252c09d7 | observations(uint256) |
| 0x883bdbfd | observe(uint32[]) |
| 0x1e4fbdf7 | OwnableInvalidOwner(address) |
| 0x118cdaa7 | OwnableUnauthorizedAccount(address) |
| 0x8da5cb5b | owner() |
| 0x02571be3 | owner(bytes32) |
| 0x6352211e | ownerOf(uint256) |
| 0x4e487b71 | Panic(uint256) |
| 0x8456cb59 | pause() |
| 0x5c975abb | paused() |
| 0xe30c3978 | pendingOwner() |
| 0x8fcbaf0c | permit(address,address,uint256,uint256,bool,uint8,bytes32,bytes32) |
| 0xd505accf | permit(address,address,uint256,uint256,uint8,bytes32,bytes32) |
| 0x514ea4bf | positions(bytes32) |
| 0xef8b30f7 | previewDeposit(uint256) |
| 0xb3d7f6b9 | previewMint(uint256) |
| 0x4cdad506 | previewRedeem(uint256) |
| 0x0a28a477 | previewWithdraw(uint256) |
| 0x5909c0d5 | price0CumulativeLast() |
| 0x5a3d5493 | price1CumulativeLast() |
| 0x544ffc9c | proposalVotes(uint256) |
| 0x7d5e81e2 | propose(address[],uint256[],bytes[],string) |
| 0x52d1902d | proxiableUUID() |
| 0x160cbed7 | queue(address[],uint256[],bytes[],bytes32) |
| 0xf8ce560a | quorum(uint256) |
| 0xad615dec | quote(uint256,uint256,uint256) |
| 0xba087652 | redeem(uint256,address,address) |
| 0x3ee5aeb5 | ReentrancyGuardReentrantCall() |
| 0xbaa2abde | removeLiquidity(address,address,uint256,uint256,uint256,address,uint256) |
| 0x02751cec | removeLiquidityETH(address,uint256,uint256,uint256,address,uint256) |
| 0xded9382a | removeLiquidityETHWithPermit(address,uint256,uint256,uint256,address,uint256,bool,uint8,bytes32,bytes32) |
| 0x2195995c | removeLiquidityWithPermit(address,address,uint256,uint256,uint256,address,uint256,bool,uint8,bytes32,bytes32) |
| 0xf8dc5dd9 | removeOwner(address,address,uint256) |
| 0x715018a6 | renounceOwnership() |
| 0x36568abe | renounceRole(bytes32,address) |
| 0x10835dbb | requestRandomness(bytes32,uint256) |
| 0x92374f15 | requestRandomWords(bytes32,uint16,uint32,uint32) |
| 0x0178b8bf | resolver(bytes32) |
| 0xd547741f | revokeRole(bytes32,address) |
| 0xd1af0c7d | rewardsToken() |
| 0x2a55205a | royaltyInfo(uint256,uint256) |
| 0x2eb2c2d6 | safeBatchTransferFrom(address,address,uint256[],uint256[],bytes) |
| 0xe570110f | SafeERC20FailedDecreaseAllowance(address,uint256,uint256) |
| 0x5274afe7 | SafeERC20FailedOperation(address) |
| 0xb88d4fde | safeTransferFrom(address,address,uint256,bytes) |
| 0xf242432a | safeTransferFrom(address,address,uint256,uint256,bytes) |
| 0x42842e0e | safeTransferFrom(address,address,uint256) |
| 0x01d5062a | schedule(address,uint256,bytes,bytes32,bytes32,uint256) |
| 0xd5fa2b00 | setAddr(bytes32,address) |
| 0xa22cb465 | setApprovalForAll(address,bool) |
| 0xf46901ed | setFeeTo(address) |
| 0xa2e74af6 | setFeeToSetter(address) |
| 0x77372213 | setName(bytes32,string) |
| 0x5b0fc9c3 | setOwner(bytes32,address) |
| 0x1896f70a | setResolver(bytes32,address) |
| 0x06ab5923 | setSubnodeOwner(bytes32,bytes32,address) |
| 0x14ab9038 | setTTL(bytes32,uint64) |
| 0xb63e800d | setup(address[],uint256,address,bytes,address,address,uint256,address) |
| 0x02fe5305 | setURI(string) |
| 0xbc25cf77 | skim(address) |
| 0x3850c7bd | slot0() |
| 0xa694fc3a | stake(uint256) |
| 0x72f702f3 | stakingToken() |
| 0x3e4f49e6 | state(uint256) |
| 0x01ffc9a7 | supportsInterface(bytes4) |
| 0x128acb08 | swap(address,bool,int256,uint160,bytes) |
| 0x022c0d9f | swap(uint256,uint256,address,bytes) |
| 0xfb3bdb41 | swapETHForExactTokens(uint256,address[],address,uint256) |
| 0x7ff36ab5 | swapExactETHForTokens(uint256,address[],address,uint256) |
| 0xb6f9de95 | swapExactETHForTokensSupportingFeeOnTransferTokens(uint256,address[],address,uint256) |
| 0x18cbafe5 | swapExactTokensForETH(uint256,uint256,address[],address,uint256) |
| 0x791ac947 | swapExactTokensForETHSupportingFeeOnTransferTokens(uint256,uint256,address[],address,uint256) |
| 0x38ed1739 | swapExactTokensForTokens(uint256,uint256,address[],address,uint256) |
| 0x5c11d795 | swapExactTokensForTokensSupportingFeeOnTransferTokens(uint256,uint256,address[],address,uint256) |
| 0x4a25d94a | swapTokensForExactETH(uint256,uint256,address[],address,uint256) |
| 0x8803dbee | swapTokensForExactTokens(uint256,uint256,address[],address,uint256) |
| 0x95d89b41 | symbol() |
| 0xfff6cae9 | sync() |
| 0x5684cff5 | testStr(string) |
| 0x59d1d43c | text(bytes32,string) |
| 0xd0c93a7c | tickSpacing() |
| 0x0dfe1681 | token0() |
| 0xd21220a7 | token1() |
| 0x4f6ccce7 | tokenByIndex(uint256) |
| 0x2f745c59 | tokenOfOwnerByIndex(address,uint256) |
| 0xc87b56dd | tokenURI(uint256) |
| 0x01e1d114 | totalAssets() |
| 0x18160ddd | totalSupply() |
| 0xa9059cbb | transfer(address,uint256) |
| 0x23b872dd | transferFrom(address,address,uint256) |
| 0xf2fde38b | transferOwnership(address) |
| 0xbce38bd7 | tryAggregate(bool,(address,bytes)[]) |
| 0x399542e9 | tryBlockAndAggregate(bool,(address,bytes)[]) |
| 0x16a25cbd | ttl(bytes32) |
| 0xfa461e33 | uniswapV3SwapCallback(int256,int256,bytes) |
| 0x3f4ba83a | unpause() |
| 0x2e17de78 | unstake(uint256) |
| 0x0900f010 | upgrade(address) |
| 0x3659cfe6 | upgradeTo(address) |
| 0x4f1ef286 | upgradeToAndCall(address,bytes) |
| 0x0e89341c | uri(uint256) |
| 0x54fd4d50 | version() |
| 0x3932abb1 | votingDelay() |
| 0x02a251a3 | votingPeriod() |
| 0xad5c4648 | WETH() |
| 0x3ccfd60b | withdraw() |
| 0xb460af94 | withdraw(uint256,address,address) |
| 0x2e1a7d4d | withdraw(uint256) |
What is a function selector?
When you call a Solidity smart contract, the first 4 bytes of the transaction calldata identify which function to run. This function selector is the first 4 bytes of the Keccak-256 hash of the function's canonical signature — its name followed by its parameter types in parentheses, such as transfer(address,uint256).
The signature must be in canonical form: no spaces, no parameter names, and shorthand types fully expanded (uint becomes uint256, int becomes int256). A signature written differently produces a completely different selector.
Features
- Compute the 4-byte selector for any Solidity signature
- Reverse lookup: decode a selector back to a matching signature
- Built-in database of common ERC-20, ERC-721, ERC-1155, ERC-4626, proxy, Uniswap, Safe, and OpenZeppelin error signatures
- Filterable selector reference table
- Matches the selectors produced by solc and web3 libraries
- Runs fully client-side — no server round-trips
When to use it
Use it when decoding raw calldata from a block explorer, crafting a low-level contract call, checking for selector collisions between overloaded functions, or verifying that a signature like transfer(address,uint256) really does map to 0xa9059cbb.
The reverse lookup covers common signatures from ERC standards, DeFi routers, proxies, and OpenZeppelin custom errors. If a selector is not in the database it is likely contract-specific — public signature registries like 4byte.directory aggregate millions of community-submitted signatures for that case.
Frequently asked questions
What is a 4-byte function selector?
The first 4 bytes of the Keccak-256 hash of a function's canonical signature — its name and parameter types, like transfer(address,uint256). It prefixes transaction calldata so the EVM knows which function to dispatch to.
How do I decode a 4-byte selector back to a function name?
Selectors are hashes, so they cannot be reversed mathematically — you look them up in a database of known signatures. Paste the selector (or full calldata) into the reverse lookup above to match it against common ERC, DeFi, proxy, and OpenZeppelin error signatures.
Why doesn't my selector appear in the database?
Most contract functions are unique to that contract. The local database covers widely deployed signatures; for contract-specific ones, public registries like 4byte.directory aggregate millions of community-submitted signatures.
Can two functions share the same selector?
Yes — the selector space is only 4 bytes, so collisions exist and are even mined deliberately for proxy attacks. solc rejects collisions inside a single contract, but an attacker can craft a function whose selector collides with a target's. Always verify the full signature, not just the selector.
Do error selectors work the same way?
Yes. Custom errors like ERC20InsufficientBalance(address,uint256,uint256) use the same keccak256-first-4-bytes scheme, and the built-in database includes the common OpenZeppelin errors you see in revert data.
