Summary
A Sepolia public RPC endpoint is a shared, no-signup HTTP URL that lets you read chain state and broadcast test transactions on the Ethereum Sepolia testnet. It is the fastest way to point a wallet, Hardhat, Foundry, or ethers/viem script at Sepolia before you commit to a paid plan.
This page gives you the exact chain settings, a working OnFinality public endpoint, faucet and debugging notes, and a short guide to when a shared endpoint is enough versus when you should move to a dedicated node.
Sepolia is Ethereum's main application testnet. If you are deploying a contract, testing a wallet flow, or wiring a CI job, you need an RPC endpoint that answers eth_chainId, eth_getBalance, and eth_sendRawTransaction reliably enough to finish the job. A public endpoint gets you there in under a minute.
This page is a reference, not a pitch. You get the exact chain settings, a working public endpoint, request examples, faucet and debugging notes, and a clear line for when a shared endpoint stops being the right tool.
Chain settings at a glance
Use these values when adding Sepolia to a wallet, a framework config, or a deployment script. They match the OnFinality Sepolia network page.
| Setting | Value |
|---|---|
| Network name | Ethereum Sepolia |
| Chain ID | 11155111 |
| Currency symbol | ETH (Sepolia Ether) |
| Decimals | 18 |
| Block explorer | https://sepolia.etherscan.io |
| Public RPC (OnFinality) | https://eth-sepolia.api.onfinality.io/public |
| Transport | HTTP JSON-RPC |
Sepolia ETH has no market value. That is the point: it lets you test value-transfer logic, gas estimation, and failure paths without risking real funds. It also means the network is reset-resistant but not production-grade, so treat any endpoint choice here as a rehearsal for mainnet.
When a public endpoint is the right fit
A shared public endpoint is usually the correct choice when:
- You are prototyping, learning, or running a one-off script.
- You are validating a contract before a mainnet deploy.
- You need a fallback URL in a wallet or dApp config.
- Your request volume is low and bursty, not sustained.
Move to a managed or dedicated endpoint when any of these become true:
- Your test suite runs on every commit and hits the endpoint hundreds of times per minute.
- You rely on
eth_getLogsover wide block ranges or ondebug_/trace_methods. - You need WebSocket subscriptions for event-driven tests.
- You need predictable behavior under load, not best-effort sharing.
If you are already past prototyping, compare the options on RPC pricing and the full list of supported RPC networks before you commit. For a broader framework, see how to choose an RPC provider.
Add Sepolia to a wallet
Most wallets accept a custom network. Fill in the fields exactly as listed above. A common mistake is pasting a mainnet RPC URL with the Sepolia chain ID, or the reverse. If the wallet shows a balance of zero for an address you funded, check the chain ID first.
For browser-based testing, you can also add the network programmatically with EIP-1193:
await window.ethereum.request({
method: "wallet_addEthereumChain",
params: [{
chainId: "0xaa36a7", // 11155111
chainName: "Ethereum Sepolia",
nativeCurrency: { name: "Sepolia Ether", symbol: "ETH", decimals: 18 },
rpcUrls: ["https://eth-sepolia.api.onfinality.io/public"],
blockExplorerUrls: ["https://sepolia.etherscan.io"]
}]
});
Verify the endpoint with curl
Before you debug your app, confirm the endpoint itself is answering. Two calls cover most cases: chain ID and latest block.
curl -s https://eth-sepolia.api.onfinality.io/public \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":1,"method":"eth_chainId","params":[]}'
curl -s https://eth-sepolia.api.onfinality.io/public \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","id":2,"method":"eth_blockNumber","params":[]}'
eth_chainId should return 0xaa36a7. If it returns 0x1, you are pointed at Ethereum mainnet. If eth_blockNumber returns a hex value that keeps increasing between calls, the endpoint is live.
Wire it into ethers or viem
In a script or test, the endpoint is just a URL. Keep it in an environment variable so you can swap it without editing code.
import { JsonRpcProvider } from "ethers";
const provider = new JsonRpcProvider(
process.env.SEPOLIA_RPC_URL ?? "https://eth-sepolia.api.onfinality.io/public"
);
const network = await provider.getNetwork();
console.log(network.chainId); // 11155111n
const block = await provider.getBlockNumber();
console.log("latest block", block);
With viem, the same idea:
import { createPublicClient, http } from "viem";
import { sepolia } from "viem/chains";
const client = createPublicClient({
chain: sepolia,
transport: http("https://eth-sepolia.api.onfinality.io/public")
});
console.log(await client.getBlockNumber());
Getting test ETH from a faucet
You cannot deploy or send transactions without Sepolia ETH. Faucets are the standard source. Most require either a small mainnet balance, a social login, or a proof-of-work style check to limit abuse.
Practical notes:
- Faucet drips are small. Budget a few requests if you are running repeated deploys.
- Some faucets rate-limit by address, IP, or account age. If one refuses, try another rather than retrying the same one.
- Faucet availability changes. Treat any specific faucet as a convenience, not a dependency in your CI pipeline.
- If a transaction is stuck, check the nonce before requesting more ETH. A pending transaction with a low nonce will block later ones.
For nonce-related failures, see the companion article on what a nonce is in blockchain transactions.
Debugging the failures you will actually hit
Most Sepolia problems are not exotic. They fall into a handful of categories, and each has a fast check.
| Symptom | Likely cause | First check |
|---|---|---|
chainId mismatch error | Wrong network in wallet or config | Call eth_chainId; expect 0xaa36a7 |
| Balance shows zero | Wrong address, wrong chain, or faucet not confirmed | Compare address and chain ID; check explorer |
nonce too low | Stale pending transaction | Inspect pending txs for the address |
insufficient funds for gas | Faucet drip not landed or gas spike | Check balance and current base fee |
eth_getLogs returns nothing | Range too wide or wrong address/topic | Narrow the block range; re-check topics |
| Request times out under load | Shared endpoint throttling | Retry with backoff; consider a dedicated node |
| Contract call reverts locally but not on-chain | Stale state or wrong block tag | Pin blockTag or refresh the provider |
A useful habit: log the raw JSON-RPC error object, not just the message. The code and data fields usually tell you whether the problem is your request, your account state, or the endpoint.
Public versus managed versus dedicated
Sepolia is a testnet, but the infrastructure decision is the same shape as mainnet. The difference is how much you are willing to trade convenience for control.
| Option | Best for | Tradeoff |
|---|---|---|
| OnFinality public endpoint | Prototyping, low-volume scripts, fallback URL | Shared capacity, no SLA |
| OnFinality RPC API | Apps that need a stable key, higher limits, and multi-network access | Requires a plan |
| OnFinality dedicated node | CI suites, archive queries, trace/debug methods, WebSocket tests | Higher cost, more setup |
OnFinality provides RPC API access and dedicated node infrastructure across many networks, including Sepolia and Base Sepolia. If your test workload is growing, the RPC API service and dedicated node pages describe the two paths. You can also review RPC pricing to see which fits your stage.
A short production-readiness checklist
Even for a testnet, it helps to treat the endpoint as part of your system:
- Pin the chain ID in config and assert it at startup.
- Keep at least two endpoints and fail over on repeated errors.
- Add retries with exponential backoff for transient failures.
- Cache
eth_chainIdandnet_version; they do not change. - Avoid unbounded
eth_getLogsranges; chunk them. - Log request IDs and error codes so you can correlate failures.
- Separate read and write paths so a stuck write does not block reads.
If you are testing on more than one L2, the same pattern applies. Base Sepolia uses chain ID 84532 and a different endpoint; see the Base Sepolia network page for its settings.
Key Takeaways
- Sepolia chain ID is 11155111; the OnFinality public endpoint is
https://eth-sepolia.api.onfinality.io/public. - Verify any endpoint with
eth_chainIdandeth_blockNumberbefore debugging your app. - Public endpoints are fine for prototyping and low-volume scripts; move to a managed or dedicated endpoint for CI, archive, trace, or WebSocket workloads.
- Most Sepolia errors are chain ID mismatches, nonce issues, or faucet delays, not endpoint outages.
- Keep a fallback endpoint and retry with backoff to smooth over shared-capacity hiccups.
Frequently Asked Questions
What is the Sepolia public RPC endpoint?
A Sepolia public RPC endpoint is a shared HTTP JSON-RPC URL for the Ethereum Sepolia testnet. The OnFinality public endpoint is https://eth-sepolia.api.onfinality.io/public. It requires no signup and is suitable for prototyping and low-volume use.
What is the Sepolia chain ID?
Sepolia's chain ID is 11155111, which is 0xaa36a7 in hex. Always confirm it with eth_chainId before sending transactions.
Is a public Sepolia endpoint safe for production?
Sepolia is a testnet, so "production" here means your test and CI workloads. A shared public endpoint is fine for light use, but for sustained load, archive queries, or trace/debug methods, a managed or dedicated endpoint is a better fit.
Why does my Sepolia balance show zero after using a faucet?
Check three things: the address you funded, the chain ID in your wallet, and whether the faucet transaction has confirmed on the explorer. Faucet drips are small and sometimes delayed.
Can I use WebSockets on a public Sepolia endpoint?
Public endpoints are typically HTTP-only. If your tests depend on eth_subscribe or event streams, use a managed or dedicated endpoint that supports WebSocket transport.
How do I debug nonce too low on Sepolia?
List pending transactions for the address. A stuck transaction with a low nonce blocks later ones. Either wait for it to confirm, replace it with a higher fee, or reset the account nonce in your local dev environment.
Where can I find other testnet endpoints?
OnFinality publishes network settings for many chains. Browse supported RPC networks to find the right endpoint and chain ID for each testnet you use.