Logo
New RPC users get 35% off their first monthView the offer
RPC Assistant

Ethereum Sepolia RPC Endpoint: Chain Settings, Setup, and Debugging

Summary

Get the Ethereum Sepolia RPC endpoint, chain ID, and network settings for wallets and dApps. Learn how to connect, get test ETH, and debug common RPC issues on this testnet.

Quick Decision: Which Sepolia RPC Should You Use?

For most development and testing on Ethereum Sepolia, a managed RPC endpoint is the fastest way to start. Public endpoints like https://eth-sepolia.api.onfinality.io/public are free and work for light usage, but they can be rate-limited and less reliable under load. If you're building a production-grade dApp, staging environment, or running automated tests that need consistent throughput, consider a dedicated node or a paid RPC plan. OnFinality offers both shared and dedicated Sepolia endpoints, with WebSocket support and archive data options. Check RPC pricing and supported networks to find the right fit for your workload.

Sepolia at a Glance

Sepolia is Ethereum's primary public testnet for developers. It mimics mainnet's proof-of-stake consensus and is designed for testing smart contracts, wallets, and infrastructure before mainnet deployment. Unlike older testnets like Goerli, Sepolia has a smaller validator set and is more stable, making it the recommended choice for most new projects.

Chain Settings for Sepolia

When adding Sepolia to a wallet or configuring a dApp, you need the following network parameters:

ParameterValue
Network NameEthereum Sepolia
RPC URLhttps://eth-sepolia.api.onfinality.io/public
Chain ID11155111 (0xaa36a7)
Currency SymbolETH
Block Explorerhttps://sepolia.etherscan.io

These settings are consistent across all EVM-compatible wallets and tools. The chain ID is critical: using the wrong one can cause transactions to be broadcast to the wrong network.

Adding Sepolia to MetaMask

To add Sepolia to MetaMask manually:

  1. Open MetaMask and click the network dropdown at the top.
  2. Click "Add network" or "Custom RPC".
  3. Enter the chain settings from the table above.
  4. Click "Save".

Alternatively, you can use a one-click button from services like ChainList, but manual entry ensures you control the RPC endpoint.

Connecting with ethers.js

Here's how to connect to Sepolia using ethers.js in a Node.js environment:

const { ethers } = require("ethers");

const provider = new ethers.JsonRpcProvider("https://eth-sepolia.api.onfinality.io/public");

async function getBlockNumber() {
  const blockNumber = await provider.getBlockNumber();
  console.log("Current block number:", blockNumber);
}

getBlockNumber();

For viem:

import { createPublicClient, http } from 'viem';
import { sepolia } from 'viem/chains';

const client = createPublicClient({
  chain: sepolia,
  transport: http('https://eth-sepolia.api.onfinality.io/public')
});

const blockNumber = await client.getBlockNumber();
console.log(blockNumber);

Getting Test ETH on Sepolia

You need test ETH to pay gas fees on Sepolia. Unlike mainnet, this ETH has no real value. Common faucets include:

  • Alchemy Sepolia Faucet – requires an Alchemy account.
  • Infura Faucet – requires an Infura account.
  • Public faucets – like sepoliafaucet.com, but availability varies.

Faucets often have daily limits and may require you to hold a small amount of mainnet ETH or have a GitHub account. If you're running a CI pipeline, consider requesting a larger allocation from a faucet that supports it.

Debugging Common Sepolia RPC Issues

Even with a reliable endpoint, you may encounter issues. Here are common symptoms and fixes:

SymptomLikely CauseFix
nonce too lowTransaction nonce mismatchReset your account nonce in MetaMask or use eth_getTransactionCount with pending block parameter
insufficient fundsNo test ETHGet test ETH from a faucet
rate limit exceededToo many requests to public endpointUse a paid plan or dedicated node
connection refusedWrong RPC URLDouble-check the endpoint URL and network settings
block not foundQuerying a block beyond the node's syncUse a full or archive node for historical data

Using WebSocket for Real-Time Updates

For applications that need real-time data, such as pending transaction monitoring, use a WebSocket endpoint. OnFinality provides WebSocket support for Sepolia. Here's an example using ethers.js:

const { ethers } = require("ethers");

const provider = new ethers.WebSocketProvider("wss://eth-sepolia.api.onfinality.io/public/ws");

provider.on("block", (blockNumber) => {
  console.log("New block:", blockNumber);
});

Note: The exact WebSocket URL may differ; check the Sepolia network page for the current endpoint.

Public vs. Dedicated Sepolia RPC

Public endpoints are free and convenient, but they come with trade-offs:

  • Rate limits: Public endpoints often limit requests per second, which can break your app under load.
  • Reliability: They may go down or become slow during peak usage.
  • Privacy: Requests are shared, so sensitive data could be exposed.

For serious development, consider a dedicated node or a paid RPC plan. OnFinality offers dedicated Sepolia nodes with predictable performance and clear rate limits, ideal for staging environments and load testing. See RPC pricing for options.

Key Takeaways

  • Sepolia is Ethereum's recommended testnet for development.
  • Use the chain ID 11155111 and the RPC URL https://eth-sepolia.api.onfinality.io/public to connect.
  • Public endpoints are fine for light testing, but consider a dedicated node for production-like workloads.
  • Always verify your nonce and gas settings when debugging transaction issues.
  • WebSocket endpoints enable real-time updates for dApps.

Frequently Asked Questions

What is the RPC URL for Ethereum Sepolia?

The public RPC URL is https://eth-sepolia.api.onfinality.io/public. You can also find other endpoints on the Sepolia network page.

What is the chain ID for Sepolia?

The chain ID is 11155111 (0xaa36a7).

How do I get Sepolia test ETH?

Use a faucet like Alchemy or Infura. You'll need to sign in and provide your wallet address.

Can I use Sepolia for production?

No, Sepolia is a testnet. Use it only for testing and development. For production, deploy to Ethereum mainnet.

What is the difference between Sepolia and Goerli?

Sepolia is the current recommended testnet, while Goerli is deprecated. Sepolia has a more stable validator set and is better maintained.

How do I add Sepolia to my wallet?

Use the chain settings provided in this article. Most wallets allow you to add a custom network.

What is the block explorer for Sepolia?

The official block explorer is https://sepolia.etherscan.io.

Does OnFinality support WebSocket for Sepolia?

Yes, OnFinality provides WebSocket support for Sepolia. Check the network page for the exact URL.

What are the rate limits for the public Sepolia RPC?

Public endpoints have rate limits to ensure fair usage. For higher limits, consider a paid plan or dedicated node.

How do I troubleshoot "nonce too low" errors?

Reset your account nonce in your wallet or use eth_getTransactionCount with the pending block parameter to get the correct nonce.

RPC Knowledge Base

Related RPC details

Never Worry about Infrastructure Again

OnFinality takes away the heavy lifting of DevOps so you can build smarter and faster.

Get Started