Book a free call

How to Create a Token on Solana, Step by Step

A token on Solana is made with the SPL Token Program, not a smart contract you write yourself. Here is the CLI route, from devnet practice to a named token.

Hertiv engineering teamReviewed by a senior engineer
7 min read
How to Create a Token on Solana, Step by Step
On this page

Short answer

A token on Solana is a digital asset created through the SPL Token Program, an on-chain program that handles minting, transfers and balances, so you do not write a smart contract to make one. With the Solana CLI and the spl-token tool you create a mint, open a token account, mint a supply and add a name and symbol, and the flow takes four commands once the tools are installed.

What is a token on Solana?

A token on Solana is a digital asset whose rules are enforced by the SPL Token Program, a shared and audited on-chain program that any developer can call. You do not deploy your own contract to make a token: you create a mint account, and the Token Program records the supply, the mint authority and every balance.

Two programs matter. The original Token Program handles plain fungible tokens with a fixed set of features. Token-2022, also called the Token Extensions Program, adds optional features such as on-chain metadata, transfer fees, confidential transfers and a permanent delegate, which you choose when the mint is created.

The table below sets out the choice.

Option What it gives you When to pick it
Token Program Basic mint, transfer and burn Simple tokens, widest wallet support
Token-2022 Metadata, fees, freeze, delegate Tokens that need extra rules
Decimals How divisible the token is 9 by default; 6 for stablecoins; 0 for whole units
Mint authority Who can create more supply Your wallet at first; disable it to fix supply

Decimals decide how the token splits: 9 decimals means one token divides into a billion smallest units, while 0 decimals means the token only exists in whole units. Choose before you create the mint, because decimals cannot be changed later. For the wider Solana build route, see Solana development.

What do you need before you start?

You need the Solana CLI, the spl-token command line tool, a wallet with a small amount of SOL for fees, and a decision on decimals, supply and name before you run the first command. Practice on devnet first, where test SOL is free from the faucet.

The tools install from the Solana docs: the Solana CLI gives you key management and network config, and the spl-token CLI talks to the Token Program. Set the network to devnet with the config command, fund the wallet from the devnet faucet, and check the balance before you start.

  • Solana CLI and spl-token CLI. Install both and confirm they run before you create anything.
  • A wallet keypair. Created with the keygen command; this wallet becomes the mint authority and pays the fees.
  • Devnet SOL. Request it from the faucet; mainnet needs real SOL and costs real money.
  • Token decisions. Name, symbol, decimals and total supply, plus whether you need Token-2022 features such as metadata or a freeze authority.

Keep the wallet keypair file safe. Whoever holds it controls the mint authority, which means they can create more tokens or hand the authority to someone else. For a plain explainer of the chain itself, see what Solana is.

How to create a token on Solana, step by step

Creating a token takes four commands once the tools are ready: create the mint, open a token account, mint the supply, and check the result. The steps below use the original Token Program on devnet.

  1. Point the CLI at devnet and fund the wallet. Set the network with the config command, then request devnet SOL from the faucet and check the balance.
  2. Create the mint. Run the create-token command with your decimals, for example nine for a typical token or two for a token priced like a currency. The output gives you the mint address: save it. A new mint starts with a supply of zero, and your wallet becomes the mint authority.
  3. Open a token account. Run the create-account command with the mint address. This creates the account that will hold your tokens; without it, there is nowhere for the minted supply to go.
  4. Mint the supply. Run the mint command with the mint address and the amount, for example one million. The tokens land in your token account.
  5. Check the result. Run the supply command to confirm the total, and the display command to see the mint authority, decimals and freeze authority.
  6. Transfer a small amount. Run the transfer command to send a few tokens to a second wallet, which proves the token moves and that the receiving wallet can hold it. If the destination wallet holds no SOL, add the flag that funds the recipient.

The mint address is the token's identity: wallets, explorers and exchanges use it to recognise the token. Anyone with the address can see the supply and the mint authority, so treat the mint creation as a public act even on devnet. The same create-token pattern works for the ERC-20 world in a different form; see how to create an ERC-20 token for the Ethereum route.

How do you add a name, symbol and image?

A token made with the basic create-token command has no name, symbol or image on chain: wallets show the mint address until metadata is added. Token-2022 stores metadata on the mint itself, which is the simplest route for a new token.

To use it, create the mint with the Token-2022 program id and the metadata extension enabled, then initialise the metadata with the token name, symbol and a link to a metadata file that holds the image address. The metadata file is a small JSON file hosted at a public address, and it points to the image.

Older tokens use the Metaplex Token Metadata program instead, which stores the name, symbol and image link in a separate metadata account tied to the mint. Both routes end in the same result: wallets and explorers show the name and image instead of a bare address.

Prepare the image before you start: a square image, usually 512 by 512 or 1024 by 1024 pixels, hosted somewhere public. A missing or unreachable image leaves the token looking unfinished in every wallet that lists it.

Example (hypothetical): a community token with a fixed split

Example (hypothetical): a small game studio creates a community token on Solana devnet with a supply of 1,000,000 tokens and 0 decimals, so the token only exists in whole units.

The studio splits the supply three ways. It keeps 600,000 tokens for rewards, which is 60% of the supply. It sets aside 250,000 tokens for community events, which is 25%. It holds 150,000 tokens for the team, which is 15%. The arithmetic adds up: 600,000 + 250,000 + 150,000 = 1,000,000.

It mints the full supply to its own token account, then transfers 250,000 tokens to the community wallet and 150,000 to the team wallet. After the transfers, its own account holds 600,000 tokens, the community wallet holds 250,000, and the team wallet holds 150,000, which matches the plan.

Finally, it disables the mint authority, so no more tokens can ever be created. That step is what makes the 1,000,000 supply a promise rather than a starting figure, and it is worth doing before the token is shared anywhere.

What are the common mistakes?

The most common mistakes when creating a Solana token are practising on mainnet, picking the wrong decimals, losing the mint authority key, and sharing the token before the metadata is ready.

  • Practising on mainnet. Every mainnet step costs real SOL and cannot be undone. Run the full flow on devnet first.
  • Wrong decimals. Decimals are set at mint creation and cannot change. A token meant to price like a currency needs 2 decimals, not the default 9.
  • Losing the keypair. The wallet that creates the mint holds the mint authority. Lose the keypair file and nobody can mint more or disable minting.
  • Leaving minting open. If the mint authority stays active, the supply can grow without warning. Disable it once the planned supply is minted.
  • Skipping metadata. A token with no name or image looks like spam in wallets. Add metadata before you share the mint address.
  • Promising value. Creating a token does not create demand for it. A token with no use, no holders and no liquidity is a mint address, not a product.

What do you do after the token exists?

After the token exists, the work shifts from creation to control and distribution: lock the supply, add metadata, and decide how the token reaches holders.

First, disable the mint authority if the supply is meant to be fixed. The command sets the mint authority to none, and after that no new tokens can be created. Second, check the token on an explorer to confirm the supply, decimals and metadata all show as intended. Third, decide on distribution: an airdrop to a list of wallets, a sale, or rewards paid out over time.

If the token needs a market, it needs liquidity: a pool on a decentralised exchange where holders can trade it. That step has its own costs and risks, and it is separate from creation. For a token that must follow rules about who can hold it, Token-2022 extensions such as transfer fees and the permanent delegate exist, but they only work if they are enabled when the mint is created.

Keep records of every step: the mint address, the token account, the metadata address and the transaction that disabled minting. A future audit, listing or support question will ask for them. For a Polygon version of the same job, see how to create an ERC-20 token on Polygon.

Key takeaways

  • No smart contract needed: the Token Program does the work
  • Decimals are fixed at mint creation, so choose first
  • Token-2022 adds metadata, fees and freeze controls
  • Disable the mint authority to fix the supply
  • Practice the full flow on devnet before mainnet

Frequently asked questions

What is an SPL token?

An SPL token is a fungible token on Solana created through the SPL Token Program. The program holds the rules for minting, transferring and burning, so a developer creates a mint account and calls the program instead of writing a smart contract. SPL stands for Solana Program Library.

How much SOL does it cost to create a token?

Creating a token costs a small amount of SOL for the account deposit and the transaction fees. The deposit is a fraction of a SOL and the fee is a few thousand lamports per signature. The exact cost depends on the network at the time, so check the current fee before you run the commands on mainnet.

What is the difference between the Token Program and Token-2022?

The original Token Program handles basic tokens with mint, transfer and burn. Token-2022, also called the Token Extensions Program, adds optional features such as on-chain metadata, transfer fees, confidential transfers, a freeze authority and a permanent delegate. Extensions must be enabled when the mint is created.

Can I change the supply after creating a token?

Yes, while the mint authority is active, the wallet that holds it can mint more tokens. Once the mint authority is disabled, the supply is fixed and no more tokens can be created. Disabling it is a one-way step, so confirm the planned supply first.

Do I need to know Rust to create a Solana token?

No. The command line route uses the Solana CLI and the spl-token tool, and no code is needed. Rust is only needed if you want to build a program that works with the token, such as a sale contract or a rewards system.

Why does my token show no name or image in a wallet?

Because the basic mint has no metadata on chain. Wallets show the mint address until a name, symbol and image are added through Token-2022 metadata or the Metaplex Token Metadata program. Add metadata before sharing the mint address.

Found this useful? Share it.
Hertiv engineering team

Written from projects we build for clients: blockchain systems in production. Every post is reviewed by a senior engineer before publishing and updated when practice changes.

About HertivHow we work

Planning a token or a Solana product and want the build done right? Talk to Hertiv.

A senior engineer replies within one business day. Or see our Solana Development service.

Book a free call

Keep reading

All posts

Tell us what you want to build

A senior engineer reads every request and replies within one business day with questions, a rough range, or a call link.

  • NDA on request before any details
  • You own all code, models and IP
  • US, UK and EU time-zone overlap

Your email app should open with your message ready to send. If it does not, write to [email protected].

Prefer email? Write to [email protected]
Estimate costBook a call