Logo

How to Connect to BNB Testnet: RPC Endpoints, Faucets, and Developer Setup

Key Takeaways

  • BNB Testnet (chain ID 97) is a free environment for testing BSC dApps and smart contracts.
  • Public RPC endpoints are available but often rate-limited; consider a dedicated provider for production testing.
  • Testnet BNB (tBNB) can be obtained from the official BNB Chain faucet or third-party faucets.
  • You can add BNB Testnet to MetaMask manually or via chainlist services.
  • Reliable RPC access reduces development friction and ensures accurate testing results.
  • OnFinality offers dedicated BNB Testnet RPC endpoints with high availability.
  • Always verify your RPC provider's uptime and support for the latest Ethereum JSON-RPC methods.

What is BNB Testnet?

BNB Testnet is a test network for BNB Smart Chain (BSC), designed for developers to deploy and test smart contracts and decentralized applications before launching on mainnet. It uses the same Proof of Staked Authority (PoSA) consensus mechanism and is fully EVM-compatible, meaning you can use familiar tools like Hardhat, Truffle, and MetaMask.

The testnet has its own native token, tBNB, which has no real-world value. You can obtain tBNB from faucets to pay for gas fees during testing. The chain ID is 97, and it is sometimes referred to as BSC Testnet.

  • Chain ID: 97
  • Native token: tBNB
  • Consensus: PoSA (Proof of Staked Authority)
  • EVM-compatible: yes
  • Block explorer: https://testnet.bscscan.com

BNB Testnet RPC Endpoints

To interact with BNB Testnet, you need an RPC endpoint. Public endpoints are available but often have rate limits and may not be suitable for intensive testing. Below are common public RPC URLs:

For production-grade testing, consider using a dedicated RPC provider like OnFinality, which offers private endpoints with higher rate limits, better uptime, and technical support.

CriterionWhat to checkWhy it matters
Rate LimitsRequests per second (RPS)Public endpoints often limit to 10-100 RPS, which can throttle your tests.
Uptime SLAService level agreementPublic endpoints have no SLA; dedicated providers offer 99.9%+ uptime.
Method SupportEthereum JSON-RPC methodsEnsure all methods you need (eth_call, eth_getLogs, etc.) are supported.
Geographic DistributionServer locationsCloser nodes reduce latency; global providers offer better performance.

How to Get tBNB from the Faucet

To deploy contracts or send transactions on BNB Testnet, you need tBNB for gas. The official BNB Chain faucet provides 0.3 tBNB every 24 hours per wallet address. You can also use third-party faucets.

Steps to claim tBNB:

1. Go to the official faucet at https://www.bnbchain.org/en/testnet-faucet.

2. Connect your wallet (e.g., MetaMask) or paste your wallet address.

3. Complete any captcha or verification.

4. Click 'Send' and wait for the transaction to confirm.

If you need more tBNB, consider using alternative faucets or requesting from community channels.

Adding BNB Testnet to MetaMask

To interact with BNB Testnet from a browser wallet like MetaMask, you need to add the network manually or via a chainlist service.

Manual configuration:

1. Open MetaMask and click the network dropdown at the top.

2. Click 'Add network' and then 'Add a network manually'.

3. Enter the following details:

- Network name: BNB Smart Chain Testnet

- New RPC URL: (use a reliable endpoint, e.g., from OnFinality)

- Chain ID: 97

- Currency symbol: tBNB

- Block explorer URL: https://testnet.bscscan.com

4. Click 'Save'.

Alternatively, use a chainlist website like https://chainlist.org to add the network with one click.

Best Practices for BNB Testnet Development

When developing on BNB Testnet, follow these best practices to ensure smooth testing:

1. Use a dedicated RPC provider for consistent performance, especially during load testing or automated CI/CD pipelines.

2. Monitor your tBNB balance and request more from faucets as needed. Some faucets have cooldown periods.

3. Test your contracts thoroughly on testnet before deploying to mainnet. Use the same tooling and configurations.

4. Keep your private keys secure. Testnet keys are less critical but still should not be exposed.

5. Use the block explorer (testnet.bscscan.com) to verify transactions and debug issues.

  • Choose an RPC provider with high uptime and low latency.
  • Automate faucet requests if you need frequent tBNB.
  • Use environment variables for RPC URLs and private keys.
  • Test edge cases like network congestion and gas estimation.

Troubleshooting Common Issues

Developers often encounter issues when connecting to BNB Testnet. Here are common problems and solutions:

- 'Insufficient funds': Ensure you have tBNB in your wallet. Use the faucet to get more.

- 'Rate limit exceeded': Public endpoints may throttle requests. Switch to a dedicated provider or reduce request frequency.

- 'Network not found': Verify the chain ID (97) and RPC URL are correct. Check if the network is added properly in your wallet.

- 'Transaction stuck': Increase gas price or use a faster RPC endpoint. You can also resubmit with a higher nonce.

  • Always verify the RPC URL and chain ID.
  • Use a reliable RPC provider to avoid rate limiting.
  • Check the faucet status if you cannot get tBNB.
  • Clear your browser cache or reset MetaMask if issues persist.

Why Choose OnFinality for BNB Testnet RPC?

OnFinality provides dedicated BNB Testnet RPC endpoints designed for developers who need reliable, high-performance access. Our infrastructure offers:

- Private endpoints with no rate limits (subject to fair use)

- Global node distribution for low latency

- Support for all standard Ethereum JSON-RPC methods

- 24/7 monitoring and technical support

Whether you are running automated tests, CI/CD pipelines, or manual development, OnFinality ensures your testnet experience is smooth and efficient.

  • Free tier available for small projects
  • Scalable plans for enterprise testing
  • Easy integration with popular tools like Hardhat and Foundry

Frequently Asked Questions

What is the BNB Testnet chain ID?

The chain ID for BNB Testnet is 97.

How do I get tBNB?

You can get tBNB from the official BNB Chain faucet at https://www.bnbchain.org/en/testnet-faucet or from third-party faucets.

What is the difference between BNB Testnet and BSC Testnet?

They are the same network. BNB Testnet is the testnet for BNB Smart Chain (formerly Binance Smart Chain).

Can I use MetaMask with BNB Testnet?

Yes, you can add BNB Testnet to MetaMask manually using the network details: RPC URL, chain ID 97, currency symbol tBNB, and block explorer URL.

Are public BNB Testnet RPC endpoints reliable?

Public endpoints are available but may have rate limits and lower uptime. For production testing, consider a dedicated RPC provider like OnFinality.

bnb testnet
RPC Knowledge Base

Related RPC details

Background

Never Worry about Infrastructure Again

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

Get Started