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

How do I add BNB Smart Chain Testnet to MetaMask?

Summary

This guide walks through adding BNB Smart Chain Testnet to MetaMask, covering chain settings, funding with tBNB, and common configuration pitfalls. It also explains how to choose a reliable RPC endpoint for testnet development and when a managed RPC service makes sense.

Quick answer: BNB Smart Chain Testnet in MetaMask

BNB Smart Chain Testnet (also called BSC Testnet) is a public test network that mirrors BNB Smart Chain mainnet. You can add it to MetaMask in under a minute using the chain settings below. The network uses chain ID 97 and the native token is test BNB (tBNB), which has no real value and comes from a faucet.

{
  "chainId": "97",
  "chainName": "BNB Smart Chain Testnet",
  "nativeCurrency": {
    "name": "BNB Chain Native Token",
    "symbol": "tBNB",
    "decimals": 18
  },
  "rpcUrls": ["https://bnb-testnet.api.onfinality.io/public"],
  "blockExplorerUrls": ["https://testnet.bscscan.com"]
}

Chain settings at a glance

SettingValue
Network nameBNB Smart Chain Testnet
RPC URLhttps://bnb-testnet.api.onfinality.io/public
Chain ID97
Currency symboltBNB
Block explorerhttps://testnet.bscscan.com

These values are the official public endpoint from OnFinality. If you use a different RPC provider, make sure the chain ID and symbol match exactly; mismatches cause MetaMask to reject the network or show the wrong balance.

Step-by-step: Add BNB Smart Chain Testnet to MetaMask

  1. Open MetaMask and click the network selector at the top of the wallet.
  2. Click Add network (or Add a network manually if you already have a custom network open).
  3. Fill in the form with the values from the table above.
  4. Click Save, then switch to the new network.
  5. Request test tBNB from a faucet (see below) and confirm the balance appears.

If you prefer a one-click option, some faucets and dApps offer a "Add to MetaMask" button that pre-fills the network details. Always verify the chain ID and RPC URL before approving.

Funding your wallet with tBNB

Testnet tokens are free and have no monetary value. To get tBNB, use an official BNB Chain faucet. Many faucets require you to connect your wallet and complete a captcha. After the request, tokens usually arrive within a minute.

If the faucet does not work, try:

  • Switching to a different faucet (search for "BNB Smart Chain testnet faucet").
  • Checking that your wallet is connected to the testnet network.
  • Waiting a few minutes and retrying, as faucets rate-limit requests.

Choosing the right RPC endpoint for testnet development

For simple wallet testing, the public RPC endpoint above is enough. But if you are building a dApp, running automated tests, or need consistent performance, consider the difference between public and managed endpoints.

Public RPC endpoints

Public endpoints are free and easy to use. They are fine for occasional requests, but they often have rate limits and can become slow during high traffic. If your app makes many calls, you may hit 429 Too Many Requests errors.

Managed RPC services

Managed services like OnFinality provide dedicated or shared RPC endpoints with higher throughput, WebSocket support, and archive data. They are designed for production workloads and give you a stable URL that does not change when you restart your node.

For testnet development, a managed endpoint helps you avoid rate limits when you are debugging or running load tests. You can start with the free public endpoint and upgrade when you need more capacity.

Common MetaMask errors and how to fix them

"Error: Chain ID mismatch"

This happens when the RPC endpoint returns a different chain ID than the one you entered. Double-check that the chain ID is 97 and that the RPC URL points to the testnet, not the mainnet.

"Error: Network not added"

MetaMask sometimes fails to add a network if the RPC URL is unreachable. Try a different RPC URL or check your internet connection. You can also add the network manually by entering the details again.

"Transaction hangs"

If transactions stay pending, your RPC endpoint may be overloaded. Switch to a more reliable endpoint or increase the gas price. On testnet, you can also try resetting your account in MetaMask (Settings > Advanced > Clear activity tab data).

"Insufficient funds"

You need tBNB to pay for gas. If your balance is zero, request more from a faucet. Remember that testnet tokens are separate from mainnet BNB.

Using the testnet with ethers.js and viem

Once the network is in MetaMask, you can connect your dApp to it using a library like ethers.js or viem. Here is an example with ethers.js:

import { ethers } from "ethers";

const provider = new ethers.JsonRpcProvider("https://bnb-testnet.api.onfinality.io/public");
const signer = await provider.getSigner(); // when using MetaMask, use browser provider instead

const balance = await provider.getBalance("0xYourAddress");
console.log("tBNB balance:", ethers.formatEther(balance));

For a browser environment, use window.ethereum to get the signer:

const provider = new ethers.BrowserProvider(window.ethereum);
await provider.send("wallet_switchEthereumChain", [{ chainId: "0x61" }]); // 97 in hex
const signer = await provider.getSigner();

When is a dedicated node worth it for testnet?

If you are only adding the network to MetaMask to try a dApp, a public endpoint is fine. But if you are a developer running a test suite or a staging environment, you may need more.

Consider a dedicated node when:

  • You need consistent performance for automated tests.
  • You require archive data to query historical state.
  • You want to avoid rate limits during load testing.
  • You need WebSocket support for real-time updates.

OnFinality offers both shared and dedicated nodes for BNB Chain Testnet. You can compare options on the RPC pricing page and see the full list of supported networks on the networks page.

Key Takeaways

  • BNB Smart Chain Testnet uses chain ID 97 and the tBNB token.
  • The official public RPC endpoint is https://bnb-testnet.api.onfinality.io/public.
  • Adding the network to MetaMask is a manual process; verify all fields to avoid errors.
  • Testnet tokens are free and obtained from faucets.
  • For development workloads, consider a managed RPC service to avoid rate limits and get better reliability.

Frequently Asked Questions

What is the BNB Smart Chain Testnet RPC URL?

The official public RPC URL is https://bnb-testnet.api.onfinality.io/public. You can also find it on the BNB Chain Testnet network page.

How do I add BNB Smart Chain Testnet to MetaMask?

Open MetaMask, go to Settings > Networks > Add Network, and enter the chain ID 97, the RPC URL, and the symbol tBNB. See the step-by-step guide above.

Where can I get test BNB?

Use an official BNB Chain faucet. Search for "BNB Smart Chain testnet faucet" and follow the instructions. Tokens are free and for testing only.

Why is my transaction stuck on BNB testnet?

Stuck transactions are often due to a slow RPC endpoint or low gas price. Try switching to a different RPC endpoint or increasing the gas limit. You can also clear MetaMask's activity data.

Can I use the same RPC URL for mainnet?

No. Mainnet uses a different chain ID (56) and a different RPC URL (https://bnb.api.onfinality.io/public). Do not mix them up, or your transactions will fail.

Does OnFinality support BNB Smart Chain Testnet?

Yes. OnFinality provides public and dedicated RPC endpoints for BNB Chain Testnet. Visit the BNB Chain Testnet network page for details.

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