Get SUI from Faucet
To perform transactions on a Sui network, you need SUI tokens to pay for gas and storage.
For applications on Mainnet, you must buy real SUI on exchanges like Coinbase, OKX, or Robinhood. Its value is determined by market factors such as supply and demand, network utility, and perceived value.
Because Mainnet tokens cost real money, development can be expensive. That's why Sui provides Devnet and Testnet networks, which mirror Mainnet features and enable you to build and test safely for an affordable cost.
SUI tokens on Devnet and Testnet are free and hold no monetary value.
You can get free SUI tokens from the Sui faucet, which lets you deploy and interact with smart contracts and objects on Devnet, Testnet, or a local network. There is no faucet for Mainnet.
- Prerequisites
-
Set up your Sui account and CLI environment.
Create Sui account and setup CLI environment.
$ sui client
If this is the first time running the sui client CLI tool, it asks you to provide a Sui full node server URL and a meaningful environment alias. It also generates an address with a random key pair in sui.keystore and a config client.yaml.
By default, the client.yaml and sui.keystore files are located in ~/.sui/sui_config. For more information, refer to the Sui client CLI tutorial.
If this is not your first time running sui client, then you already have a client.yaml file in your local environment. If you'd like to create a new address for this tutorial, use the command:
$ sui client new-address ed25519
Request SUI tokens from faucet
Visit the online faucet to request SUI tokens: https://faucet.sui.io/
Then, follow these steps:
- Connect your wallet or paste your wallet address in the address field. Get your wallet address in the CLI with the command
sui client active-address. - Use the network dropdown to select the correct network: Testnet, Devnet, or Localnet. It is recommended to use the Testnet for most use cases before deploying to Mainnet for production. Learn more about the available networks and their differences.
- Click the Request SUI button.
To request more SUI, refresh your browser and click the Request SUI button again. The requests are rate limited, however, so too many requests results in a waiting period before you are able to request more tokens.
Community faucets
You can also use the following community-provided faucets to obtain SUI tokens:
These faucets have their own separate limits, such as one request per day or one request every few hours.
Verify token balance
To check your balance of SUI tokens and confirm you received some from the faucet, use the command:
$ sui client balance
Alternatively, use a Sui Explorer such as SuiVision or SuiScan to check the SUI token balance of an address.
You should have a balance of SUI tokens:
╭────────────────────────────────────────────╮
│ Balance of coins owned by this address │
├────────────────────────────────────────────┤
│ ╭────────────────────────────────────────╮ │
│ │ coin balance (raw) balance │ │
│ ├────────────────────────────────────────┤ │
│ │ Sui 56804696124 0.50 SUI │ │
│ ╰────────────────────────────────────────╯ │
╰────────────────────────────────────────────╯
If you do not have a balance, repeat the request SUI tokens from faucet steps, or use an alternative faucet method.
Return unused Testnet SUI
The faucet drains from a finite pool of SUI. If the pool empties, it disrupts faucet service for the rest of the community. To help ensure this doesn't happen, you can use the online faucet to return your unused SUI to the Testnet pool. You cannot return SUI to the Devnet or Localnet pools.
There are two ways to return unused Testnet SUI tokens:
-
Connect your wallet to the online faucet, and click the Return tokens to faucet button. Approve the transaction using your wallet and your SUI tokens are returned to the pool.
-
If you prefer not to connect your wallet, send the tokens to the address
0x7a9d19d4c210663926eb549da59a54e25777fef63161bfccda08277b58b4212evia a separate transaction.
Alternative methods for getting SUI tokens
If you need an alternative method to get SUI tokens for deployment on Testnet or Devnet, you have several options.
Every method to obtain SUI tokens for Testnet and Devnet is rate limited. If you need a large amount of SUI tokens, use a local network.
- Discord
- cURL
- TypeScript SDK
-
Join Discord.
If you try to join the Sui Discord channel using a newly created Discord account, you might need to wait a few days for validation.
-
Request SUI tokens in the Sui #devnet-faucet or #testnet-faucet Discord channels. Send the following message to the channel, replacing
<YOUR SUI ADDRESS>with your client address:!faucet <YOUR SUI ADDRESS>
Use the following cURL commands to set console variables and request tokens directly from the faucet server. Set NETWORK to either testnet or devnet.
$ ADDRESS=$(sui client active-address)
$ NETWORK=testnet
$ curl --location --request POST "https://faucet.${NETWORK}.sui.io/v2/gas" \
--header "Content-Type: application/json" \
--data-raw "{
\"FixedAmountRequest\": {
\"recipient\": \"${ADDRESS}\"
}
}"
If you're working with a local network, replace "https://faucet.${NETWORK}.sui.io/v2/gas" with the appropriate value based on which package runs your network:
sui-faucet:http://127.0.0.1:5003/gassui:http://127.0.0.1:9123/gas
You can access the faucet using the Sui TypeScript SDK.
import { getFaucetHost, requestSuiFromFaucetV2 } from '@mysten/sui/faucet';
// get tokens from the Devnet faucet server
await requestSuiFromFaucetV2({
// connect to Devnet
host: getFaucetHost('devnet'),
recipient: '<YOUR SUI ADDRESS>',
});
SUI tokens on a local network
If you are running a local Sui network, you can get SUI tokens from your local faucet. See the Connect to a Local Network topic for details.