The world's leading Web3 wallet with support for Ethereum, Layer 2s, and multiple EVM chains. Connect your MetaMask to access the entire Ethereum ecosystem.
Connect to Ethereum, Polygon, Arbitrum, Optimism, and other EVM-compatible networks.
Manage ETH, ERC-20 tokens, and NFTs with comprehensive asset support.
Seamlessly interact with thousands of decentralized applications and DeFi protocols.
// Check if MetaMask is installed
if (typeof window.ethereum !== 'undefined') {
// Request account access
const accounts = await window.ethereum.request({
method: 'eth_requestAccounts'
});
// Get the current chain ID
const chainId = await window.ethereum.request({
method: 'eth_chainId'
});
// Get the first account
const address = accounts[0];
}