How-to for developers · NFTs

Mint and Burn NFTs Using JavaScript

In plain words

This tutorial shows how to mint new NFTs, list the NFTs an account owns and burn an NFT, using a JavaScript sample in your browser. To mint is to create an NFT. To burn is to destroy it for good.

Written by zerps in plain words, from the source linked below.
Section
Tutorials

What you need

Download the NFT Modular Tutorials archive and open mint-nfts.html in a browser. Choose a test network, Devnet or Testnet. Then get two test accounts: new ones, or accounts from seeds you already have.

Minting an NFT

Select an account and set the Flags field. The page recommends the value 8 for testing, which sets the tfTransferable flag so the NFT can be transferred to another account. Otherwise it can only be transferred back to the issuing account. Enter the NFT URL, a URI that points to the data or metadata of the NFT, the Transfer Fee and an NFT Taxon, which is required but can be 0. You can also set an expected price, a Destination address that will be the only account allowed to buy, and an Expiration in days. Then click Mint NFT.

Listing and burning

Click Get NFTs to list the NFTs owned by the selected account. The code sends an account_nfts request for this. The current owner of an NFT can always burn it. Select the account that owns the NFT, enter the NFT ID and click Burn NFT. The code sends an NFTokenBurn transaction.

The transfer fee

The Transfer Fee is a percentage of the proceeds from future sales of the NFT that goes back to the original creator. It is a value from 0 to 50000, which allows rates between 0.000% and 50.000% in steps of 0.001%. If the Flags field does not make the NFT transferable, set the fee to 0. If you set a transfer fee, your NFT can only be traded for tokens for which your account has a trust line.

Good to know

A price in XRP is entered in drops, and one drop is the smallest unit of XRP. To price the NFT in an issued currency, enter the currency, the issuer and the amount.

Source: xrpl.org. Read 6 December 2026.

Zerpedia states what the source says, in plain words, and gives no opinion. How Zerpedia is made

zerps Trading tokens on the XRP Ledger carries risk, including total loss. zerps is a self-custodial interface; it does not hold funds, give advice, or execute trades on your behalf.