Comprehensive guide for nft metadata standards covering essential concepts, practical examples, and production best practices.
NFT metadata standards define the structure, content, and delivery of descriptive data that accompany non-fungible tokens on blockchains. This matters when a token’s visual and contextual identity—its image, title, description, attributes, animations, and links—must be resolved efficiently and reliably across wallets, marketplaces, and explorers. The metadata is the contract between the token’s on-chain data and its off-chain representation, and it becomes critical when a user sees an NFT in a browser or mobile app and expects that the same asset appears consistently across all platforms.
NFT metadata is typically a JSON object stored off-chain and referenced from the token’s on-chain URI. The most widely adopted format is a self-contained JSON document with a strict schema. The root-level structure includes fields like name, description, image, external_url, animation_url, background_color, and properties, with image and animation_url pointing to media files hosted on IPFS, S3, or CDN.
{
"name": "CryptoPunk #3333",
"description": "A 24-year-old cyberpunk from the year 2099, born in Neo-Tokyo.",
"image": "https://ipfs.io/ipfs/QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/3333.png",
"animation_url": "https://ipfs.io/ipfs/QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/3333.glb",
"external_url": "https://cryptopunks.app/punk/3333",
"attributes": [
{
"trait_type": "Eyes",
"value": "Cybernetic"
},
{
"trait_type": "Headwear",
"value": "Neon Hair"
}
],
"properties": {
"files": [
{
"uri": "https://ipfs.io/ipfs/QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/3333.png",
"type": "image/png"
},
{
"uri": "https://ipfs.io/ipfs/QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/3333.glb",
"type": "model/gltf+json"
}
],
"creators": [
{
"address": "0x0123456789abcdef0123456789abcdef01234567",
"share": 1.0
}
]
}
}
The image field is mandatory and expected to be a URL to a static image. The animation_url is optional but widely used for 3D or animated NFTs. If both image and animation_url are present, the client should prefer animation_url for interactive previews but fall back to image for static rendering.
Storage is typically on IPFS, with content-addressed URLs using the ipfs:// scheme, and the metadata file is resolved via the token’s tokenURI field, which is a URI to the metadata JSON. The most common pattern is to pin the JSON file to IPFS and include a metadata.json file at the root of the content directory.
On-chain, the metadata is referenced via the tokenURI field in a standard NFT contract such as ERC-721 or ERC-1155. When querying a token’s metadata, a client fetches the URI using HTTP or IPFS. The resolution process is straightforward:
curl -H "Accept: application/json" https://ipfs.io/ipfs/QmXoypizjW3WknFiJnKLwHCnL72vedxjQkDDP1mXWo6uco/metadata.json
The response is expected to be valid JSON. A malformed tokenURI—such as a missing metadata.json file, a typo in the file name, or an incorrect IPFS CID—results in a 404 Not Found or 400 Bad Request response, which the client may log as a silent failure. A common mistake is storing the metadata file at metadata.json but pointing the tokenURI to the directory path without a trailing /, causing a redirect and a failed resolution.
If the metadata is not found, clients typically fall back to a default image and title. A 404 response with an empty body is treated as a failure, and the client may log error: metadata_fetch_failed, token_id=1234, uri="ipfs://Qm...".
The attributes array is central to NFTs, used for filtering, sorting, and displaying traits. Each entry is an object with trait_type and value fields. The trait_type is a string identifying the category (e.g., “Background”, “Clothing”), and value is the specific value (e.g., “Blue”, “T-Shirt”). The value may be a string, number, or even an object in more advanced use cases.
A subtle failure mode is inconsistent capitalization and spelling in trait_type. For example, “Eyes” and “eyes” are treated as different traits by a marketplace, reducing the effectiveness of filtering. A robust client should normalize the trait names to a canonical form (e.g., lowercase with title casing) when building a filter index.
The properties object allows for extensible metadata beyond the core schema. It can include files, creators, license, collection, edition, external_id, and more. The files array is particularly useful for multi-file NFTs such as 3D models, where each file represents a different layer or format.
"properties": {
"files": [
{
"uri": "ipfs://Qm.../3333.png",
"type": "image/png",
"name": "Base Image"
},
{
"uri": "ipfs://Qm.../3333.glb",
"type": "model/gltf+json",
"name": "3D Model"
}
],
"license": "CC0 1.0",
"collection": {
"name": "CryptoPunks",
"version": "1.0"
}
}
The creators array supports multiple contributors with ownership shares. The share field is a float between 0 and 1, representing the percentage of royalties or revenue each creator receives. If the sum of shares is not 1.0, the client may either normalize the shares or raise a warning.
Validating metadata is critical in production. A client should validate the JSON schema against a known set of required fields and types. The following is a minimal validation check:
name is a non-empty stringimage is a valid URLattributes is an array of objects with trait_type and valueexternal_url is a valid URL (starts with http or https)A common failure is a name field that is null or "", which causes the client to render a blank title. Similarly, an image URL that resolves to a 404 or a non-image MIME type (e.g., application/json) results in a broken image preview.
Clients should also validate the animation_url by fetching it and checking that the response is a valid 3D model, video, or animation. A animation_url pointing to a .json file that is not a GLB or MP4 file is silently ignored unless the client explicitly checks the MIME type or file extension.
While IPFS is the dominant storage layer, the metadata can also be served via HTTP. A client may prefer HTTP for faster access and simpler cache management. The tokenURI can point directly to a CDN-hosted JSON file:
https://nft-assets.example.com/3333/metadata.json
The CDN can serve the file with Cache-Control: public, max-age=3600 headers. When metadata is updated, the client should re-fetch the file after the max-age period. A common mistake is not updating the tokenURI when the metadata changes, so an old version of the JSON persists even after the file is replaced.
IPFS provides content addressing, so the same metadata JSON can be resolved from multiple CIDs. The client should handle CID changes in the tokenURI. For example, a token with tokenURI: ipfs://Qm.../metadata.json may have its metadata updated and pinned to a new CID, Qn..., but the tokenURI is not updated in the contract. The client then fetches the old metadata from the old CID, causing a mismatch.
When NFTs exist across multiple chains (e.g., Ethereum, Polygon, Solana), metadata must be consistent and resolvable in each environment. The tokenURI field in the ERC-721 contract is a standard, but each chain may have its own metadata resolution pattern.
On Ethereum, tokenURI is a string field. On Solana, the metadata is often stored in a Metadata account, which contains the same JSON structure, and the client must fetch it using getAccount from the Solana RPC. The metadata.json file is typically stored on IPFS, and the tokenURI is a https:// URL pointing to it.
A common failure is using the same metadata.json file across chains but with different image or animation_url URLs tailored to each chain’s rendering capabilities. For example, a Solana NFT may have a high-resolution PNG for image, while the Ethereum version uses a smaller JPEG. The client must resolve the correct metadata based on the chain context.
image field: The client renders a placeholder but no image. The image field is often forgotten during metadata generation.animation_url: The client expects a .glb or .mp4 file but receives a .json file. No error is logged, and the animation fails to load.trait_type values: “Eyes” vs “eyes” vs “EYE” causes filtering to fail across platforms.properties object: An extra comma in files or a missing creators array causes the client to fail silently.tokenURI points to a CID that is not pinned, or the metadata file is missing in the CID, leading to a 404 with no fallback.tokenURI is updated in IPFS but not in the blockchain, so old metadata persists for months.metadata.json file with name, image, description, and attributes.ipfs:// or https:// URIs.animation_url for animated or 3D NFTs.properties to extend metadata with files, creators, and collection.external_url points to a canonical URL for the NFT.tokenURI in the blockchain contract whenever metadata changes.curl, ipfs cat, and curl -I to verify HTTP headers and MIME types.404 and 400 responses from metadata endpoints with fallbacks.trait_type values across the system to ensure consistent filtering and display.NFT metadata standards are not a one-time configuration but a continuous process of validation, distribution, and monitoring. The success of an NFT collection hinges on the fidelity of its metadata across all clients and platforms.
This page was rewritten on 18 October 2026. It replaced a templated version that was not specific to its own title. How these pages are written and checked. If anything here is wrong, tell us at [email protected] and we will correct it.
We use cookies for analytics (Google Analytics) and advertising (Google AdSense) to improve your experience and support free content. Privacy Policy