Skip to content
Standard SPL Tokens don’t include metadata like a name, symbol, or image. The Metaplex Token Metadata Program solves this by creating a metadata account linked to each token mint.
This guide covers the Metaplex Token Metadata Program which can be used for standard SPL Tokens and Token-2022. To use the Token-2022 Metadata Extension, see the Metadata Extension guide which stores metadata directly on the mint account.

​How Token Metadata Works

The Token Metadata Program creates a program-derived address (PDA) for each token mint. This metadata account stores onchain information like the token’s name and symbol, plus a URI pointing to offchain JSON metadata (images, descriptions, etc.).
The metadata PDA is derived from seeds: ["metadata", program_id, mint_address]

​Setup

The examples on this page use @solana/kit and the Metaplex Token Metadata Kit client:
Terminal
@metaplex-foundation/mpl-token-metadata-kit 0.0.3 loads @solana-program/token at runtime without listing it as a dependency, so install it as well. The Metaplex client is also built on @solana/kit 6, and npm installs a second copy of Kit for it. The two copies’ RPC types don’t match, so the update example reads the metadata account with Kit’s fetchEncodedAccount and decodes it with decodeMetadata instead of passing rpc to fetchMetadata. The examples also call assertIsTransactionWithBlockhashLifetime before sending, which sendAndConfirmTransactionFactory needs to type-check. The examples send transactions to a local validator at http://127.0.0.1:8899. A plain local validator doesn’t include the Token Metadata program, so start one that loads it from mainnet. Surfpool fetches the programs and accounts your transactions use from mainnet on demand:
Terminal
With the Solana CLI’s test validator, clone the program when it starts:
Terminal
The examples sign with your default Solana CLI keypair (~/.config/solana/id.json), which pays for the transactions and becomes the token’s update authority. If you don’t have one, create it with solana-keygen new.

​Create Token with Metadata

The createV1 instruction creates both the mint account and its metadata in a single transaction.

​Typescript

​Fetch Token Metadata

To learn how to fetch metadata for existing tokens, see the Fetch Token Metadata cookbook recipe.

​Update Token Metadata

The update authority can modify the metadata if the account is mutable.
Kit

​Token Standards

The Token Metadata Program supports different token standards:
StandardDescriptionUse Case
FungibleStandard fungible token with metadataCurrencies, points
FungibleAssetFungible token representing a unique assetSemi-fungible items
NonFungibleNFT with Master Edition1/1 artwork
ProgrammableNonFungibleNFT with enforced royaltiesCreator royalties
NonFungibleEditionPrinted copy of an NFTLimited editions
ProgrammableNonFungibleEditionPrinted copy with enforced royaltiesLimited editions

​Offchain Metadata Format

The uri field points to a JSON file containing extended metadata. The standard format follows the Metaplex Token Metadata Standard:
token-metadata.json
Store your metadata JSON on a reliable, permanent storage solution like Arweave, IPFS, or a dedicated CDN. If the URI becomes inaccessible, wallets and explorers won’t be able to display your token’s metadata.

​Metadata Account Structure

The onchain metadata account stores a Metadata struct, with the name, symbol, URI, royalties, and creators nested in a Data struct (source):

​Best Practices

  1. Set appropriate mutability: Use isMutable: false for tokens that should never change
  2. Use reliable URI hosting: Offchain metadata should be on permanent storage
  3. Verify creators: Creator addresses should be verified to confirm authenticity
  4. Consider royalties: Set sellerFeeBasisPoints for secondary sale royalties (marketplaces may or may not enforce these)