Logo

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

Key Takeaways

  • BNB Testnet (Chain ID 97) is an EVM-compatible testnet for BNB Smart Chain, using tBNB as the native token.
  • Public RPC endpoints are available but often rate-limited; dedicated endpoints provide better reliability for development.
  • The official BNB Chain faucet distributes 0.3 tBNB every 24 hours; alternative faucets exist through third-party providers.
  • Adding BNB Testnet to MetaMask requires the correct RPC URL, Chain ID 97, and currency symbol tBNB.
  • For production-grade testing, consider using a managed RPC service to avoid rate limits and ensure uptime.
  • BNB Testnet mirrors mainnet functionality, making it ideal for testing smart contracts, dApps, and analytics pipelines.
  • Archive node access is available for historical data queries, useful for analytics and debugging.

What Is BNB Testnet?

BNB Testnet is a test network for BNB Smart Chain (formerly Binance Smart Chain). It is fully EVM-compatible, meaning you can deploy Solidity smart contracts and use Ethereum tooling like Hardhat, Truffle, and Remix. The testnet uses a Proof of Staked Authority (PoSA) consensus mechanism, same as mainnet, ensuring realistic transaction behavior.

The network's Chain ID is 97, and the native token is tBNB (test BNB). tBNB has no real-world value and is only used for testing purposes. Developers can obtain tBNB from faucets to pay for gas fees during testing.

  • Chain ID: 97
  • Native Token: tBNB
  • Consensus: Proof of Staked Authority (PoSA)
  • Block Time: ~3 seconds
  • EVM Compatibility: Full

BNB Testnet RPC Endpoints

To interact with BNB Testnet, you need an RPC endpoint. Public endpoints are available but often have strict rate limits and may be unreliable for development. Below are common public endpoints and a recommended managed service.

For production testing or team workflows, a dedicated RPC endpoint from a provider like OnFinality offers higher rate limits, archive data, and guaranteed uptime.

  • Public RPC URL: https://data-seed-prebsc-1-s1.bnbchain.org:8545
  • Public WebSocket: wss://data-seed-prebsc-1-s1.bnbchain.org:8546
  • OnFinality Public Endpoint: https://bnb-testnet.api.onfinality.io/public
  • OnFinality WebSocket: wss://bnb-testnet.api.onfinality.io/public-ws
CriterionWhat to checkWhy it matters
Rate LimitsRequests per second (RPS) allowedPublic endpoints may throttle at 10-20 RPS; dedicated endpoints offer higher limits.
Archive DataSupport for historical state queriesEssential for analytics, debugging, and dApps that need past block data.
Uptime SLAService level agreement for availabilityPublic endpoints have no SLA; managed services often guarantee 99.9%+ uptime.
Geographic DistributionNumber of regions for endpoint hostingCloser endpoints reduce latency; multi-region improves reliability.

How to Get tBNB from the BNB Testnet Faucet

The official BNB Chain faucet at https://www.bnbchain.org/en/testnet-faucet distributes 0.3 tBNB every 24 hours per wallet. You need a small amount of BNB on mainnet (0.002 BNB) to claim. Alternative faucets exist through third-party services like QuickNode and Chainstack.

For large-scale testing, you may need to request additional tokens through community channels or run your own faucet. Always verify the faucet URL to avoid scams.

  • Official faucet: https://www.bnbchain.org/en/testnet-faucet
  • Claim amount: 0.3 tBNB per 24 hours
  • Requires 0.002 BNB on BSC mainnet for eligibility
  • Alternative faucets: QuickNode, Chainstack (third-party)

Adding BNB Testnet to MetaMask

To add BNB Testnet to MetaMask, go to Settings > Networks > Add Network and enter the following details. Alternatively, use a chainlist service like thirdweb or Revoke.cash for one-click addition.

Once added, you can switch to BNB Testnet and use your tBNB balance to deploy contracts and send transactions.

  • Network Name: BNB Chain Testnet
  • New RPC URL: https://data-seed-prebsc-1-s1.bnbchain.org:8545
  • Chain ID: 97
  • Currency Symbol: tBNB
  • Block Explorer URL: https://testnet.bscscan.com

Best Practices for Using BNB Testnet

When developing on BNB Testnet, consider the following best practices to ensure a smooth experience and avoid common pitfalls.

Using a managed RPC service like OnFinality can help you avoid rate limits and provide consistent performance, especially when running automated tests or CI/CD pipelines.

  • Use a dedicated RPC endpoint for development to avoid rate limiting and service interruptions.
  • Monitor your testnet usage to understand gas costs and optimize contract deployment.
  • Leverage archive nodes for historical data if your dApp requires past state queries.
  • Test thoroughly on testnet before deploying to mainnet, including edge cases and high-load scenarios.
  • Keep your testnet private keys secure; while tBNB has no value, compromised keys can lead to loss of control.

Common Use Cases for BNB Testnet

BNB Testnet is used for a variety of development and testing scenarios. Here are some common use cases where a reliable testnet RPC is essential.

For each use case, having a dependable RPC endpoint ensures accurate testing and faster iteration.

  • Smart Contract Development: Deploy and test Solidity contracts before mainnet launch.
  • dApp Integration: Test frontend and backend interactions with the blockchain.
  • Analytics and Data Indexing: Query historical data for dashboards and reporting.
  • CI/CD Pipelines: Automate contract deployment and testing in a sandbox environment.
  • Wallet and Tooling Testing: Verify wallet integrations and transaction flows.

Troubleshooting Common BNB Testnet Issues

Developers may encounter issues when using BNB Testnet. Below are common problems and solutions.

If you experience persistent issues, consider switching to a managed RPC provider for better support and reliability.

  • Rate Limiting: Public endpoints may throttle requests. Use a dedicated endpoint or API key to increase limits.
  • Connection Timeouts: Check your network configuration and try a different RPC URL.
  • Insufficient tBNB: Use the official faucet or alternative faucets to obtain test tokens.
  • Transaction Failures: Ensure you are using the correct Chain ID (97) and have enough gas.
  • Block Explorer Delays: Testnet explorers may have slight delays; verify transactions via RPC directly.

Frequently Asked Questions

What is the BNB Testnet Chain ID?

The BNB Testnet Chain ID is 97.

How do I get tBNB for testing?

You can get tBNB from the official BNB Chain faucet at https://www.bnbchain.org/en/testnet-faucet, which distributes 0.3 tBNB every 24 hours. You need 0.002 BNB on mainnet to claim.

What is the difference between BNB Testnet and BNB Smart Chain mainnet?

BNB Testnet is a testing environment that mirrors mainnet functionality but uses tBNB with no real value. Mainnet uses real BNB and is used for production applications.

Can I use Ethereum tools with BNB Testnet?

Yes, BNB Testnet is EVM-compatible, so you can use Ethereum development tools like Hardhat, Truffle, Remix, and MetaMask.

Why is my BNB Testnet RPC request failing?

Common causes include rate limiting on public endpoints, incorrect RPC URL, or network connectivity issues. Try using a dedicated RPC endpoint or check your firewall settings.

bnb testnet
RPC Knowledge Base

Related RPC details

Background

Nunca te preocupes por la infraestructura nuevamente

OnFinality elimina la carga pesada de DevOps para que puedas construir de forma más inteligente y rápida.

Comenzar