Non-Fungible Tokens
A guide to help you create your own non-fungible tokens

Create an NFT with Stacks because it builds on Bitcoin — inheriting the security and permanence of the most durable chain via Proof-of-Transfer. Clarity smart contracts make logic easy to audit, reducing the guessing and attack surface common in NFT projects. Plus, Stacks NFTs tap into a Bitcoin-aligned community that values ownership, longevity, and real on-chain utility.
Custom Development
For developers who want full control over their token implementation, here’s how to create a custom SIP-009 NFT on Stacks using Clarity. But before you deploy the NFT contract, you must have your NFT contract conform to the SIP-009 trait standard.
Define SIP-009 non-fungible token trait
Below is an implementation of the SIP-009 trait standard for non-fungible tokens. You can use the existing minimal standard SIP-009 trait or extend it by adding in your own custom traits. But the requirements of the SIP-009 traits are necessary to have at the minimum.
All we are doing here is defining the function signatures for functions we'll need to implement in our NFT contract, which we can see a simple version of below.
Implement SIP-009 trait in NFT contract
Any NFT contract that wants to conform to the SIP-009 non-fungible token standard for Stacks needs to have this trait "implemented" in their NFT contract. See the below minimal NFT contract example of how this is done.
This is the Clarity code we need in order to create an NFT, with one additional function, mint that allows us to actually create a new NFT. This mint function is not needed to adhere to the trait.
The token contract example above is passing in an already deployed trait on mainnet into the impl-trait function. You can use this same deployed trait for your own NFT contract as well.
Deployed SIP-010 trait contracts you can directly implement in your custom token contract:
[mainnet] SP2PABAF9FTAJYNFZH93XENAJ8FVY99RRM50D2JG9.nft-trait
[testnet] ST1NXBK3K5YYMD6FD41MVNP3JS1GABZ8TRVX023PT.nft-trait
Reminder: when implementing these deployed traits in your contract, be sure to also add them as a contract requirement in Clarinet.
Best Practices
Here are some things to consider when creating your NFT and after your NFT is launched.
Additional Resources
[Stacks] Explore NFTs on Stacks
[Clarity Book] SIP009: the NFT standard
[StacksGov] SIP-009 Standard Trait Definition for Non-Fungible Tokens
[StacksGov] SIP-016 Schema Definition for Metadata for Digital Assets
[StacksGov] SIP-019 Notifications for Token Metadata Updates
[contract] SP1H6HY2ZPSFPZF6HBNADAYKQ2FJN75GHVV95YZQ.token-metadata-update-notify
[Hiro YT] How to Display NFTs in a Wallet Using the Token Metadata API
[Hiro YT] A Beginner's Overview of the Megapont Ape NFT Clarity Smart Contract
[Hiro YT] Stacker Chat with Muneeb Ali: Diving Deeper into Bitcoin NFTs
[Hiro Blog] Breaking Down NFT Code Snippets in Clarity
[Hiro Blog] How Sigle Built NFT-Gated Features in Their App
Last updated
Was this helpful?
