

Networks and faucets
Practice on Testnet or Devnet with free test XRP. Check which network you joined.
Key points
- Mainnet is real money. Testnet and Devnet use free, worthless XRP.
- A faucet funds test accounts. Test networks can be reset.
- Check network_id before you send: 0 Mainnet, 1 Testnet, 2 Devnet.
The lesson
The XRP Ledger has more than one network. They run the same software, but their money never mixes.
- is the real one. Its XRP has real value.
- is for practice. Its XRP is free and worth nothing.
- is for trying new features before they reach Mainnet.
Test networks give out XRP from a , like a free sample counter. Ask, and a new account gets test XRP. Test networks can also be reset, so keep nothing there you need.
is a JavaScript library that talks to these networks. You give it a server address. Point it at a Testnet server, and every mistake is free.
Before sending anything, check where you are. Each network has an ID number. A program that checks it will never send real XRP by accident.
Install:
npm install xrpl(version 5.3.0 on 2026-11-15). It runs in Node.js and browsers.Public servers ():
Network network_idServer Faucet Mainnet 0 wss://xrplcluster.com/None Testnet 1 wss://s.altnet.rippletest.net:51233Yes Devnet 2 wss://s.devnet.rippletest.net:51233Yes Connect and check the network:
import { Client } from "xrpl" const client = new Client("wss://s.altnet.rippletest.net:51233") await client.connect() const info = await client.request({ command: "server_info" }) if (info.result.info.network_id !== 1) throw new Error("Not Testnet")After
connect(),client.networkIDholds the same number. Networks with an ID above 1024 need aNetworkIDfield on every transaction;autofilladds it..
client.fundWallet()asks the or faucet for a new, funded account. It picks the faucet from the , and there is none for . Test balances and accounts can vanish in a reset.Related: Running a node, How amendments happen.

