Summary
The BNB Smart Chain Testnet (chain ID 97) is an EVM-compatible test environment for building and testing dApps before mainnet deployment. This page provides the official RPC endpoints, chain configuration, faucet links, and common debugging tips to help developers get started quickly.
BNB Smart Chain Testnet Decision Checklist
Before you start building on BNB Smart Chain Testnet, consider the following:
| Criterion | What to check | Why it matters |
|---|---|---|
| Endpoint reliability | Does the provider offer a dedicated or shared endpoint? | Shared endpoints may have rate limits that affect testing. |
| WebSocket support | Does the endpoint support wss? | Required for real-time event listening (e.g., pending transactions, logs). |
| Faucet availability | Can you get tBNB easily? | Without test tokens, you cannot deploy contracts or send transactions. |
| Archive data | Do you need historical state? | Archive nodes are needed for certain queries like eth_getBalance at old blocks. |
| Chain ID | Is it 97 (0x61)? | Using the wrong chain ID will cause transaction rejections. |
| Explorer | Can you verify transactions? | Testnet BscScan helps debug failed transactions. |
What Is BNB Smart Chain Testnet?
BNB Smart Chain Testnet (also called BSC Testnet) is a test environment that mirrors the BNB Smart Chain mainnet. It uses the same Proof of Staked Authority (PoSA) consensus and is fully EVM-compatible. Developers use it to deploy and test smart contracts, dApps, and infrastructure without risking real funds. The native token is tBNB, which has no monetary value and can be obtained from faucets.
Chain Configuration
To connect to BNB Smart Chain Testnet, use the following settings:
- Network Name: BNB Smart Chain Testnet
- RPC URL: See endpoints below
- Chain ID: 97 (0x61)
- Currency Symbol: tBNB
- Block Explorer URL: https://testnet.bscscan.com
RPC Endpoints
Public Endpoints (Rate Limited)
These endpoints are provided by the BNB Chain team and various community providers. They are suitable for light testing but may have rate limits (e.g., 10,000 requests per 5 minutes).
https://data-seed-prebsc-1-s1.bnbchain.org:8545
https://data-seed-prebsc-2-s1.bnbchain.org:8545
https://bsc-testnet-rpc.publicnode.com
wss://bsc-testnet-rpc.publicnode.com
Managed Endpoints (Higher Reliability)
For more consistent performance, consider using a managed RPC provider like OnFinality. OnFinality offers dedicated and shared endpoints for BNB Smart Chain Testnet with higher rate limits, WebSocket support, and optional archive data.
https://bnb-testnet.api.onfinality.io/public
wss://bnb-testnet.api.onfinality.io/public
To get a private endpoint with dedicated resources, sign up at OnFinality and create an API key.
Getting tBNB from the Faucet
You need tBNB to pay gas fees on testnet. Use one of these faucets:
- BNB Chain Faucet – Official faucet, requires a Twitter account.
- Thirdweb Faucet – Provides 0.01 tBNB per day.
- Chainstack Faucet – Alternative option.
Tip: If a faucet is dry, try another or wait for the cooldown period.
Adding BSC Testnet to MetaMask
- Open MetaMask and click the network dropdown.
- Click Add Network.
- Enter the following details:
- Network Name: BNB Smart Chain Testnet
- RPC URL:
https://data-seed-prebsc-1-s1.bnbchain.org:8545(or your preferred endpoint) - Chain ID:
97 - Currency Symbol:
tBNB - Block Explorer URL:
https://testnet.bscscan.com
- Click Save.
Alternatively, use Chainlist to add the network with one click.
Testing with curl
Verify your RPC endpoint is working:
curl -X POST https://bnb-testnet.api.onfinality.io/public \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_blockNumber","params":[],"id":1}'
Expected response:
{"jsonrpc":"2.0","id":1,"result":"0x733a3b"}
Common Pitfalls and Debugging
1. Wrong Chain ID
If transactions fail with "chainId mismatch," ensure your wallet or dApp uses chain ID 97 (0x61).
2. Insufficient tBNB
Check your balance using:
curl -X POST <rpc-url> \
-H "Content-Type: application/json" \
-d '{"jsonrpc":"2.0","method":"eth_getBalance","params":["<your-address>","latest"],"id":1}'
If balance is 0, use a faucet.
3. Rate Limiting
If you get HTTP 429 errors, reduce request frequency or switch to a private endpoint.
4. eth_getLogs Disabled
Some public endpoints disable eth_getLogs. Use a provider that supports it or switch to WebSocket for real-time logs.
5. WebSocket Connection Drops
Ensure your client handles reconnection. Example with WebSocket:
const WebSocket = require('ws');
const ws = new WebSocket('wss://bnb-testnet.api.onfinality.io/public');
ws.on('open', () => {
ws.send(JSON.stringify({jsonrpc:"2.0", method:"eth_subscribe", params:["newHeads"], id:1}));
});
ws.on('message', (data) => console.log(data));
When to Use a Managed RPC Provider
While public endpoints are fine for quick tests, production-grade development often requires:
- Higher rate limits – Avoid throttling during automated testing.
- Archive data – Query historical state for debugging.
- WebSocket reliability – Stable connections for event subscriptions.
- Dedicated nodes – Isolated resources for consistent performance.
OnFinality provides all these options for BNB Smart Chain Testnet. You can start with a free shared endpoint and upgrade as needed. Check RPC pricing and supported networks for details.
Key Takeaways
- BNB Smart Chain Testnet (chain ID 97) is an EVM-compatible test network using tBNB.
- Use public endpoints for light testing; consider managed providers for heavier workloads.
- Always verify chain ID and faucet availability before deploying.
- WebSocket support is essential for real-time dApps.
- Debugging common issues like rate limits and disabled methods saves time.
Frequently Asked Questions
Q: What is the BNB Smart Chain Testnet RPC URL?
A: Public URLs include https://data-seed-prebsc-1-s1.bnbchain.org:8545 and https://bnb-testnet.api.onfinality.io/public. For a private endpoint, sign up at OnFinality.
Q: How do I get tBNB? A: Use the official BNB Chain faucet or third-party faucets like Thirdweb. Most require a social login.
Q: Can I use the same contract on testnet and mainnet? A: Yes, because both networks are EVM-compatible. Just ensure you use the correct chain ID and redeploy.
Q: Why are my transactions pending forever? A: Check your tBNB balance and gas price. Also ensure you are connected to the correct RPC endpoint.
Q: Does OnFinality support BSC Testnet? A: Yes, OnFinality offers both shared and dedicated endpoints for BNB Smart Chain Testnet. Visit BNB Testnet network page for details.