Understanding how to retrieve the balance of Ether (ETH) on the Ethereum blockchain is a fundamental skill for developers, investors, and enthusiasts interacting with decentralized applications (dApps), wallets, or smart contracts. Whether you're building a wallet interface, auditing transactions, or simply checking your holdings, knowing the correct tools and methods is essential.
This guide walks you through the process of obtaining an Ethereum address’s ETH balance using reliable infrastructure providers. We’ll also explore key concepts, best practices, and frequently asked questions to ensure you have a complete understanding of this core blockchain operation.
Understanding Ethereum Node Access
To query blockchain data—like an account's ETH balance—you need access to an Ethereum node. A node is a server that stores a full copy of the blockchain and can validate and relay transactions. However, running your own node requires significant technical expertise and resources.
For most users and developers, it's more efficient to use third-party Ethereum node providers that offer Application Programming Interfaces (APIs) to interact with the network seamlessly.
👉 Discover powerful tools to interact with Ethereum and track balances in real time.
Reliable Ethereum Node Providers
The two most widely used and trusted Ethereum node service platforms are:
Infura
Infura provides scalable, secure access to Ethereum (and other blockchains) through HTTPS and WebSocket endpoints. It’s ideal for dApp developers who want to focus on frontend logic without managing backend infrastructure.
- Offers free tier with rate-limited access
- Supports mainnet and testnets (Ropsten, Goerli, etc.)
- Easy integration via API keys
Website: https://infura.io
Alchemy
Alchemy enhances raw blockchain data with developer tools, monitoring, and analytics. It's known for high reliability, faster response times, and advanced debugging features.
- Free plan available for beginners
- Enhanced APIs for deeper insights
- Excellent documentation and support
Website: https://www.alchemy.com
Both platforms allow you to make JSON-RPC calls—standard methods for communicating with Ethereum nodes—to retrieve account balances, send transactions, and more.
Step-by-Step: Get ETH Balance Using JSON-RPC
Here’s how to programmatically get the ETH balance of any Ethereum address using the eth_getBalance method.
1. Create an Account on Infura or Alchemy
Sign up at either Infura or Alchemy, create a new project, and select “Ethereum” as the network. You’ll receive an HTTPS endpoint URL containing your unique API key.
Example endpoint:
https://eth-mainnet.g.alchemy.com/v2/YOUR_API_KEY2. Use the eth_getBalance Method
This JSON-RPC method takes two parameters:
- The Ethereum address (e.g.,
0x...) - The block number (use
"latest"for current balance)
Example Request (via curl):
curl https://eth-mainnet.g.alchemy.com/v2/YOUR_API_KEY \
-X POST \
-H "Content-Type: application/json" \
-d '{
"jsonrpc": "2.0",
"method": "eth_getBalance",
"params": ["0xYourEthereumAddress", "latest"],
"id": 1
}'Example Response:
{
"jsonrpc": "2.0",
"id": 1,
"result": "0x21c3d5c300"
}⚠️ The result is returned in wei, the smallest unit of ETH (1 ETH = 10¹⁸ wei).
3. Convert Wei to ETH
Use a converter or code library like Web3.js or Ethers.js to transform the hexadecimal wei value into readable ETH.
In JavaScript (using ethers.js):
const ethers = require('ethers');
const wei = '0x21c3d5c300';
const eth = ethers.utils.formatEther(wei);
console.log(eth); // Output: ~2.45 ETHAlternative Methods: SDKs and Libraries
For non-curl implementations, consider using developer-friendly libraries:
Web3.js
A popular JavaScript library for interacting with Ethereum.
const Web3 = require('web3');
const web3 = new Web3('https://eth-mainnet.g.alchemy.com/v2/YOUR_API_KEY');
async function getBalance(address) {
const balanceWei = await web3.eth.getBalance(address);
const balanceEth = web3.utils.fromWei(balanceWei, 'ether');
console.log(`Balance: ${balanceEth} ETH`);
}Ethers.js
Lightweight and secure alternative with better type support.
import { ethers } from 'ethers';
const provider = new ethers.providers.JsonRpcProvider('YOUR_INFURA_ENDPOINT');
const balance = await provider.getBalance('0xYourAddress');
const ethBalance = ethers.utils.formatEther(balance);These tools abstract away raw RPC calls, making development faster and less error-prone.
Common Use Cases
- Wallet Development: Display real-time balances in crypto wallets.
- Transaction Monitoring: Track inflows/outflows for accounting or security.
- Smart Contract Interaction: Verify user balances before executing functions.
- Audit & Compliance: Validate holdings across multiple addresses.
👉 Access advanced blockchain tools to streamline development and balance tracking.
Core Keywords
To align with search intent and improve SEO visibility, here are the core keywords naturally integrated throughout this article:
- ETH balance
- Ethereum network
- get ETH balance
- Infura Ethereum
- Alchemy API
- JSON-RPC eth_getBalance
- check Ethereum balance
- Ethereum node provider
These terms reflect common queries from developers and users seeking technical solutions for blockchain data retrieval.
Frequently Asked Questions (FAQ)
How do I get someone’s ETH balance without running a node?
You can use third-party services like Infura or Alchemy that provide API access to Ethereum nodes. Simply send a JSON-RPC eth_getBalance request to their endpoint with the target address.
Is it safe to expose my API key when calling eth_getBalance?
Never expose your API key in client-side code (like frontend JavaScript). Instead, route requests through a backend server or use environment variables to protect sensitive credentials.
Why does the balance return in wei instead of ETH?
The Ethereum protocol operates in wei to maintain precision. One ETH equals 1,000,000,000,000,000,000 wei. Always convert the result using libraries like ethers.utils.formatEther() for user readability.
Can I check testnet ETH balances the same way?
Yes! Both Infura and Alchemy support Ethereum testnets (e.g., Goerli, Sepolia). Just switch your endpoint to the desired testnet URL when initializing your provider.
What if I get a zero balance even though funds should be there?
Double-check:
- Address spelling (case-insensitive but must be correct)
- Network (mainnet vs. testnet)
- Block confirmation status
- RPC endpoint connectivity
Delays or misconfigurations may cause temporary discrepancies.
Are there rate limits on free-tier node providers?
Yes. Free plans on Infura and Alchemy typically include monthly request caps or rate limiting. For production apps requiring high uptime and throughput, consider upgrading to a paid plan.
Final Thoughts
Retrieving an ETH balance is a foundational task in Ethereum development—and thanks to modern infrastructure providers like Infura and Alchemy—it’s now accessible even to beginners. By leveraging their APIs and tools like Web3.js or Ethers.js, you can integrate real-time balance checks into your applications efficiently.
As blockchain usage grows, mastering these basics empowers you to build more robust, transparent, and user-friendly decentralized systems.
👉 Start building today with reliable blockchain infrastructure and real-time data access.