• EasyStackTools189+ Free Tools
  • EVM Tools
    • JSON Formatter
    • JSON Minify
    • Base64 Encoder/Decoder
    • URL Encoder/Decoder
    • Hash Generator
    • Calculate MD2 Hash
    • Calculate MD4 Hash
    • Calculate MD5 Hash
    • Calculate MD6 Hash
    • Calculate RipeMD-128 Hash
    • Calculate RipeMD-160 Hash
    • Calculate RipeMD-256 Hash
    • Calculate RipeMD-320 Hash
    • Calculate SHA1 Hash
    • Calculate SHA2 Hash
    • Calculate SHA-224 Hash
    • Calculate SHA-256 Hash
    • Calculate SHA-384 Hash
    • Calculate SHA-512 Hash
    • Calculate SHA3 Hash
    • Calculate CRC16 Hash
    • Calculate CRC32 Hash
    • Calculate Adler32 Hash
    • Calculate Whirlpool Hash
    • Calculate NTLM Hash
    • Calculate All Hashes at Once
    • HTML Minifier
    • CSS Minifier
    • JavaScript Minifier
    • Regex Tester
    • Diff Checker
    • XML Formatter
    • Markdown Preview
    • User Agent Parser
    • IP Info Lookup
    • URL Analyzer
    • JWT Decoder
    • SQL Formatter
    • Webhook Tester
    • Checksum Address Generator
    • Address Validator
    • Keccak256 Hasher
    • ABI Encoder & Decoder
    • Event Topic Generator
    • Function Selector Generator
    • JSON Escape/Unescape
    • Certificate Decoder
  1. Home
  2. EVM Tools
  3. Developer Tools
  4. Function Selector Generator

Function Selector Generator

Generate the 4-byte Solidity function selector from a signature or ABI JSON using Keccak-256. Free, instant, client-side — for calldata, debugging, and EVM contract calls.

Read the guide

The function signature will be normalized to transfer(address,uint256) before hashing.

Common Functions

Guide and examples

Ethereum contract calls use a 4-byte function selector—the first 4 bytes of the Keccak-256 hash of the function signature. The Function Selector Generator produces this selector from a Solidity function signature or ABI JSON so you can build calldata, decode calldata, or verify function signatures in ABI.

What is a Solidity function selector?

A function selector is the first 4 bytes of the Keccak-256 hash of a Solidity function signature. It uniquely identifies a function in Ethereum smart contracts and is used in contract calls. The tool accepts the function signature (e.g. transfer(address,uint256)) or ABI JSON and outputs the 4-byte selector. All processing is performed locally in your browser; no function signatures or ABI data are sent to any server. Use it to get the 4-byte selector for contract calls, to decode calldata, or to verify function signatures in ABI. Function selectors let smart contracts identify which function to execute when receiving a transaction. The same standard works for all EVM-compatible chains (e.g. Polygon, BNB Chain, Avalanche).

Key Features

  • Selector — First 4 bytes of Keccak-256 hash of function signature. Uniquely identifies function in contract calls.
  • Input — Function signature (e.g. transfer(address,uint256)) or ABI JSON. Tool computes 4-byte selector.
  • Why use — Smart contracts use selectors to identify which function to execute. Essential for correct contract behavior and interaction.
  • Privacy — All processing is performed locally in your browser. No function signatures or ABI data are sent to any server.
  • EVM chains — Works for all EVM-compatible chains (Polygon, BNB Chain, Avalanche).
  • When to use — Contract calls, decode calldata, verify function signatures in ABI.

How to Use the Function Selector Generator

  1. Open the Function Selector Generator tool.
  2. Enter Solidity function signature (e.g. transfer(address,uint256)) or paste ABI JSON. Copy the 4-byte selector.
  3. Use the "Use tool" button on the docs page if you are reading this from the documentation.

Real Use Cases

  • Contract calls — Get selector for eth_call or transaction data. Use with Event Topic Generator, ABI Encoder & Decoder, and Keccak256 Hasher.
  • Decode calldata — Identify function from first 4 bytes. Use with ABI Encoder & Decoder to decode parameters.
  • Verify ABI — Confirm selector in ABI matches expected. Use with ABI Encoder & Decoder.
  • Documentation — List selectors for your contract. Use output as reference.
  • Indexers — Map selector to function name. Use with Keccak256 Hasher for full hash.
  • Multi-chain — Same selector on all EVM chains. One tool for Ethereum, Polygon, etc.

Why Use the Function Selector Generator Instead of Alternatives?

  • vs. Event Topic Generator — Event Topic Generator produces event topic0. This tool produces function selector. Use selector for calls; use topic for events.
  • vs. ABI Encoder & Decoder — ABI Encoder & Decoder builds full calldata. This tool gives the 4-byte selector. Use both: selector + encoded params.
  • vs. Keccak256 Hasher — Keccak256 Hasher gives full hash. This tool gives first 4 bytes (selector). Use selector tool for calldata; use hasher for custom hash.
  • vs. Manual — No need to hash and take first 4 bytes. Paste signature, get selector.

Benefits for Smart Contract Developers

  • Developers — Get selector for frontends and scripts. Decode calldata and verify ABI.
  • Integration — Build or parse transaction data. One place for 4-byte selector.

Common Mistakes

  • Signature format — Use canonical form: functionName(type1,type2). No spaces (or match contract). Wrong format changes selector.
  • Expecting full calldata — This tool gives selector only. For full calldata use ABI Encoder & Decoder.
  • Event vs function — Events use full keccak256 (topic0). Functions use first 4 bytes. Use Event Topic Generator for events.
  • Forgetting to copy — Copy the selector before closing the tab.

Frequently Asked Questions

What is a Solidity function selector?

A function selector is the first 4 bytes of the Keccak-256 hash of a Solidity function signature. It uniquely identifies a function in Ethereum smart contracts and is used in contract calls.

How do I generate a function selector?

Enter your Solidity function signature (e.g., transfer(address,uint256)) or paste ABI JSON. The tool will instantly compute the 4-byte selector.

Why are function selectors important in Ethereum?

Function selectors allow smart contracts to identify which function to execute when receiving a transaction, ensuring correct contract behavior and interaction.

Is my function data secure when using this tool?

Yes. All processing is performed locally in your browser. No function signatures or ABI data are sent to any server.

Can I use this tool for any EVM-compatible blockchain?

Yes. Function selector generation follows the Ethereum standard and works for all EVM-compatible chains such as Polygon, BNB Chain, and Avalanche.

When should I use the function selector generator?

Use it to get the 4-byte selector for contract calls, to decode calldata, or to verify function signatures in ABI.

Conclusion and Try the Tool

Function Selector Generator gives you the 4-byte selector in one place: enter signature or ABI, get selector. No server, no account. For events use Event Topic Generator, for calldata use ABI Encoder & Decoder, and for raw hash use Keccak256 Hasher.

Use the Function Selector Generator tool to generate 4-byte function selectors.

Frequently Asked Questions

A function selector is the first 4 bytes of the Keccak-256 hash of a Solidity function signature. It uniquely identifies a function in Ethereum smart contracts and is used in contract calls.

Related Tools

  • ABI Encoder & Decoder

    Encode function calls into ABI format or decode ABI-encoded data back into human-readable form. Essential for Ethereum smart contract development.

  • Keccak256 Hasher

    Generate keccak256 hash online instantly. Solidity compatible hashing for Ethereum smart contract development. UTF-8 text and hex input modes.

  • Event Topic Generator

    Generate Ethereum event topic0 by hashing Solidity event signatures with keccak256. Supports direct signature input and ABI JSON parsing.

  • Hex ↔ Decimal

    Convert hex to uint256 decimal and decimal to hex with full 256-bit precision. Decode Ethereum calldata, event logs, and on-chain values in your browser.