ERC-20 Token Balance

March 26, 2026 · View on GitHub

Query the ERC-20 token balance of any Ethereum address — a simple "Hello World" for interacting with smart contracts.

Try it out: shawntabrizi.com/ERC20-Token-Balance

How It Works

  1. Enter an Ethereum address to get its ETH balance
  2. Enter an ERC-20 token contract address to get the token balance, name, and symbol

Uses ethers.js to query the Ethereum blockchain. Connects to your browser wallet (MetaMask, etc.) if available, otherwise falls back to a free public RPC endpoint.

Example Token Contracts

TokenContract Address
USDC0xA0b86991c6218b36c1d19D4a2e9Eb0cE3606eB48
USDT0xdAC17F958D2ee523a2206206994597C13D831ec7
DAI0x6B175474E89094C44Da98b954EedeAC495271d0F

License

MIT