Skip to main content
Loading…
AS Albert Schaper
  • 01Home
    • Profile & Career
    • Expertise
    • Overview
    • Results
    • Technical Depth
  • 04Projects
  • 05Contact
  • 06Insights
  • 07Tools
AS

Albert Schaper

01Home
Profile & CareerExpertise
OverviewResultsTechnical Depth
04Projects05Contact06Insights07Tools

AI · Finance · Entrepreneur

Home / Tools / Function Selector
Web3 Lab · T.13

Function Selector

Paste a signature → 4-byte selector (Keccak-256). Or paste a selector or calldata → known signature from a local table, with a handoff to the ABI decoder.

All toolsABI DecoderTransaction DecoderETH ConverterGuide: 4-byte selectorGuide: Calldata

This tool needs JavaScript (runs locally in your browser).

Examples — signature → selector:
ERC-20
NFT
Ownable
Selector → signature (local table) and calldata:

Note: the Keccak-256 hash of the canonical signature is computed entirely locally — nothing leaves your browser. The reverse direction (selector → signature) only looks up a small built-in table of common standards; a hash cannot be provably reversed. Same logic as the ABI Decoder, which you can open with the signature (and calldata) prefilled.

Knowledge · ABI

What the 4-byte selector means

Every smart contract call starts with a 4-byte function selector: the first four bytes of the Keccak-256 hash of the canonical function signature — no spaces, no parameter names, e.g. transfer(address,uint256).

That yields 0xa9059cbb for ERC-20 transfer. In raw calldata these four bytes precede the ABI-encoded arguments; the ABI Decoder uses this fingerprint to find the matching function.

The tool works both ways: a signature is hashed into its selector — no ABI JSON required. A hash cannot be reversed mathematically, so the reverse direction looks the selector up in a small built-in table of common functions (ERC-20, ERC-721, ERC-1155, Ownable, AccessControl, Pausable, proxy). Everything runs on the same ethers.js layer as the ABI decoder (wallet-lib.js), fully offline.

The result link (?sig=… or ?selector=…) is shareable, and the ABI decoder opens with the signature prefilled on request — plus the data when you pasted calldata.

Go deeper: What the 4-byte selector means.

FAQ

Frequently asked questions

Why don't parameter names matter?
Solidity hashes only types and the function name: transfer(address,uint256), not transfer(address to, uint256 amount). ethers.js canonicalizes that when hashing.
What about overloads?
Two functions with the same name but different parameter types have different selectors — because the signature differs. The selector distinguishes them in calldata.
Is this Ethereum-only?
Yes — the same ABI encoding and selector rule applies on all EVM chains (Ethereum, L2s, sidechains).
Why doesn't the tool recognize some selectors?
A selector is a hash and cannot be reversed. The reverse direction only works for functions in the built-in table (over 60 common standard functions). Querying a large signature database would need network access — this tool deliberately does not do that.
Can I paste full calldata?
Yes. The tool reads the first four bytes as the selector, shows the signature (if known) and hands calldata plus ABI to the ABI decoder with one click.
Does my input leave the browser?
No. No backend, no blockchain query — pure local cryptography. When sharing, the link only carries the signature or selector, never long calldata.

Planning smart-contract integration or an ABI pipeline?

Selectors, calldata and decoding belong in every Web3 project — I help with reviews and clear developer tooling.

Request a callTo the ABI Decoder
AS

AI · Finance · Entrepreneur

Navigation

HomeAboutExpertiseProjectsContactInsightsTools

Projects

Best-AI.orgBitAutorGeld 2.0Pharmaceutical company

Tools

ETH Unit ConverterAddress ValidatorQR Code GeneratorSeed Phrase ValidatorWallet Generator

© Albert Schaper. All rights reserved.

Privacy / Imprint