Non-Fungible Tokens, or NFTs, are unique digital assets managed by on-chain smart contracts following the ERC-721 standard. These contracts generate token IDs linked to URLs pointing to off-chain assets such as images, videos, or metadata. With the growing emphasis on content permanence in the Web3 ecosystem, leveraging decentralized storage solutions has become essential for long-term asset preservation.
This guide walks you through the process of uploading digital assets to decentralized storage, creating compliant metadata, and deploying a smart contract to mint your own NFT. We will use NFT.Storage for off-chain asset hosting and Remix IDE for contract development.
Understanding NFT Storage and Metadata
NFT.Storage is a free decentralized storage platform powered by IPFS (InterPlanetary File System) and Filecoin. IPFS generates unique content identifiers (CIDs) for each uploaded file, ensuring immutable addressing, while Filecoin provides long-term persistence through cryptographic proofs like Proof-of-Spacetime.
Metadata describes an NFT’s properties—such as name, description, and image URL—using a JSON schema. Marketplaces use this data to display NFTs correctly. Adhering to established metadata standards ensures compatibility and usability.
Uploading Files to NFT.Storage
To host your NFT assets reliably, follow these steps:
- Visit the NFT.Storage website and log in to your account.
- Navigate to the "Files" section from the dashboard.
- Click the "Upload" button and select your digital asset (e.g., an image file).
- Confirm the upload and wait for the process to complete.
- Once uploaded, click the "Action" button to copy the IPFS URL (e.g.,
ipfs://bafy...) and the CID.
This IPFS URL will be embedded in your metadata JSON to link the on-chain token with its off-chain asset.
Creating NFT Metadata
Metadata must conform to standards like Ethereum’s ERC-721 metadata guidelines or Enjin’s recommendations. Here’s how to create a basic metadata file:
- Create a new text file and rename it with a
.jsonextension. Use the following JSON schema as a template:
{ "name": "Your NFT Name", "description": "A detailed description of your NFT", "image": "ipfs://your-image-cid-here" }- Replace
"Your NFT Name"and the description with relevant details. - Paste the IPFS URL of your uploaded asset into the
"image"field. - Save the file and upload this JSON to NFT.Storage, just as you did with the image.
- Copy the new IPFS URL for this metadata file—it will serve as the token URI during minting.
Minting an ERC-721 NFT with Remix IDE
Remix IDE is a web-based tool for writing, compiling, and deploying Ethereum smart contracts. We’ll use it to mint an NFT:
- Open Remix IDE in your browser and create a new file with a
.solextension. Copy and paste the following Solidity code:
// SPDX-License-Identifier: MIT pragma solidity ^0.8.9; import "@openzeppelin/contracts/token/ERC721/ERC721.sol"; import "@openzeppelin/contracts/token/ERC721/extensions/ERC721URIStorage.sol"; import "@openzeppelin/contracts/access/Ownable.sol"; contract MyToken is ERC721, ERC721URIStorage, Ownable { constructor() ERC721("MyToken", "MTK") {} function safeMint(address to, uint256 tokenId, string memory uri) public onlyOwner { _safeMint(to, tokenId); _setTokenURI(tokenId, uri); } function _burn(uint256 tokenId) internal override(ERC721, ERC721URIStorage) { super._burn(tokenId); } function tokenURI(uint256 tokenId) public view override(ERC721, ERC721URIStorage) returns (string memory) { return super.tokenURI(tokenId); } }- Customize the token name and symbol by modifying
"MyToken"and"MTK". - Compile the contract using the Solidity compiler tab in Remix.
- Switch to the "Deploy & Run Transactions" tab, select an injected Web3 provider (like MetaMask), and deploy the contract.
- After deployment, expand the contract instance and call the
safeMintfunction. - Enter your wallet address in the
tofield, a unique number fortokenId, and the metadata IPFS URL in theurifield. - Confirm the transaction to mint your NFT.
Your ERC-721 token is now live on the blockchain, linked permanently to your decentralized assets.
👉 Explore more NFT development strategies
Frequently Asked Questions
What is the ERC-721 standard?
ERC-721 is an Ethereum smart contract standard for non-fungible tokens. It defines functions for tracking ownership, transferring tokens, and managing metadata, ensuring interoperability across platforms.
Why use decentralized storage for NFTs?
Centralized servers can fail or change content, breaking NFT integrity. Decentralized storage like IPFS uses content-based addressing, guaranteeing that the link always points to the correct asset.
Is NFT.Storage completely free?
Yes, NFT.Storage offers free storage indefinitely by leveraging the Filecoin network. Users can upload files without cost while benefiting from decentralized persistence.
Can I change my NFT’s metadata after minting?
No, once minted, the token URI is immutable if stored on-chain. Off-chain metadata can be technically changed, but doing so violates trust principles in Web3.
What wallets support ERC-721 tokens?
Most Web3 wallets like MetaMask, Trust Wallet, and Coinbase Wallet support ERC-721. You can view and manage NFTs directly in these applications.
Do I need coding skills to create an NFT?
Basic familiarity with JSON, smart contracts, and development tools is helpful. However, no-code platforms exist for creators who prefer simplified minting processes.