Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
Free 30-min Web3 Consultation
Book Consultation
Smart Contract Security Audits
View Audit Services
Custom DeFi Protocol Development
Explore DeFi
Full-Stack Web3 dApp Development
View App Services
LABS
Glossary

Token Metadata Schema

A token metadata schema is a standardized data structure, often defined as a JSON object, that describes the properties, name, image, and attributes of a blockchain token.
Chainscore © 2026
definition
BLOCKCHAIN GLOSSARY

What is a Token Metadata Schema?

A formal specification defining the structure and attributes of data associated with a blockchain token, enabling interoperability across wallets, marketplaces, and applications.

A Token Metadata Schema is a standardized data model that specifies the required and optional fields for describing a fungible or non-fungible token (NFT). It defines the structure of the metadata object, which typically includes core attributes like name, symbol, description, image URI, and attributes. This schema acts as a contract between token creators and consumer applications, ensuring that wallets, explorers, and marketplaces can parse and display token information consistently. Prominent examples include the ERC-721 Metadata JSON Schema and ERC-1155 Metadata URI JSON Schema on Ethereum, which have become de facto standards across many blockchains.

The schema's primary function is to enable interoperability and discoverability. Without a common schema, each application would need custom parsers for every token type, fragmenting the ecosystem. By adhering to a known schema, a token's visual representation, traits, and other properties are rendered predictably. This is critical for NFT collections, where attributes like rarity, edition number, and multimedia links are essential. The schema often extends beyond basic identity to include complex nested structures for properties, levels, and stats, as seen in gaming or collectible tokens.

Implementation typically involves storing the schema-compliant metadata in a JSON file hosted at a URI, which is then referenced by the token's smart contract via the tokenURI method. While on-chain storage is possible, cost constraints usually lead to the use of decentralized storage solutions like IPFS or Arweave for permanence. The schema itself may also define the format for mutable versus immutable metadata and protocols for updates, balancing flexibility with the need for provenance. Evolving standards, such as ERC-721c for composable metadata, demonstrate how schemas adapt to new use cases like dynamic NFTs.

Beyond the basic standards, extensions and custom schemas address niche requirements. For instance, the Metaplex Token Metadata Standard on Solana includes fields for creators' shares and primary sales, catering to digital art markets. Similarly, schemas for Real-World Asset (RWA) tokens might mandate regulatory fields or legal document hashes. The choice of schema impacts everything from user experience to secondary market liquidity, making it a foundational component of token design. Developers must carefully select or design a schema that aligns with their token's utility and long-term roadmap.

Looking forward, the evolution of token metadata schemas is closely tied to advancements in off-chain data verifiability and cross-chain communication. Initiatives like ERC-7496 (NFT Dynamic Traits) and Schema.org integrations aim to create richer, more verifiable, and internet-native metadata frameworks. As the token landscape expands beyond simple collectibles to represent complex rights, identities, and assets, the role of robust, extensible metadata schemas will only grow in importance for a coherent multi-chain ecosystem.

key-features
ARCHITECTURE

Key Features of a Token Metadata Schema

A token metadata schema defines the standardized structure for describing a digital asset's properties, enabling interoperability across wallets, marketplaces, and explorers.

01

Standardized Core Attributes

A schema enforces a consistent structure for essential token properties, ensuring universal readability. Key fields include:

  • Name: The human-readable identifier (e.g., "Chainscore Governance Token").
  • Symbol: The ticker symbol (e.g., "CSCORE").
  • Decimals: The divisibility of the token, defining its smallest unit.
  • Total Supply: The fixed or dynamic total number of tokens in existence. This standardization is foundational for wallets to display balances and for exchanges to list assets.
02

Extended Metadata & Visual Assets

Beyond core data, schemas support rich, descriptive metadata crucial for NFTs and branded tokens. This includes:

  • Description: A detailed explanation of the token's purpose or the NFT's artwork.
  • Image/Animation URI: A pointer to the visual or media asset representing the token.
  • External URL: A link to a project's website or the NFT's dedicated page.
  • Attributes/Properties: Key-value pairs for traits (e.g., {"rarity": "Legendary", "background": "Space"}).
03

Decentralized Storage & URI Pointers

Metadata is typically stored off-chain for efficiency, with the on-chain token contract holding a Uniform Resource Identifier (URI) pointer. Common storage solutions include:

  • IPFS (InterPlanetary File System): A decentralized protocol using Content Identifiers (CIDs) for immutable, permanent storage.
  • Arweave: A blockchain-like protocol designed for permanent, low-cost data storage.
  • Centralized HTTPS: A traditional web server, which introduces a single point of failure and mutability risk.
04

Interoperability via ERC Standards

Widely adopted schemas are defined by Ethereum Request for Comments (ERC) standards, creating a common language across the ecosystem.

  • ERC-20: The foundational standard for fungible tokens, defining a basic metadata interface.
  • ERC-721: The standard for non-fungible tokens (NFTs), adding unique token IDs and richer metadata extensions.
  • ERC-1155: A multi-token standard that can represent both fungible and non-fungible assets within a single contract, with efficient batch operations.
05

On-Chain vs. Off-Chain Metadata

Schemas define where and how data is stored, a critical design choice.

  • On-Chain Metadata: All data is stored directly in the smart contract's storage. This guarantees permanence and availability but is extremely gas-intensive and immutable.
  • Off-Chain Metadata: Only a URI hash is stored on-chain, pointing to a JSON file hosted elsewhere. This is cost-effective and flexible but relies on the persistence of the external data source (e.g., IPFS, Arweave).
06

Verifiability & Provenance

A robust schema enables the verification of a token's authenticity and history. This is achieved through:

  • Immutable Links: Using decentralized storage (IPFS CIDs) creates a tamper-proof connection between the token ID and its metadata.
  • Signature Verification: Metadata can include cryptographic signatures from the creator to prove authorship.
  • Chain of Custody: For NFTs, the transaction history on the blockchain provides a public, verifiable record of ownership transfers from the original mint.
how-it-works
TECHNICAL PRIMER

How a Token Metadata Schema Works

A token metadata schema is the standardized blueprint that defines the structure and attributes of data associated with a blockchain token, enabling interoperability across wallets, marketplaces, and applications.

A token metadata schema is a formal specification that dictates the structure—the fields, data types, and formats—of the descriptive information attached to a fungible or non-fungible token (NFT). This schema acts as a contract between the token issuer and the applications that display or interact with it, ensuring that attributes like name, description, image, and custom properties are consistently understood. Widely adopted standards, such as the ERC-721 Metadata JSON Schema or Metaplex's Token Metadata on Solana, provide a foundational framework that developers extend to include project-specific traits, such as rarity scores, unlockable content links, or animation URLs.

The schema's data is typically stored off-chain for efficiency and cost reasons, as storing large media files directly on a blockchain is prohibitively expensive. The most common pattern involves storing the metadata as a JSON file on a decentralized storage network like IPFS or Arweave, with the token's on-chain smart contract containing only a pointer—a URI (Uniform Resource Identifier)—to that file. This separation of concerns allows for rich, mutable media (like updated artwork) while maintaining the immutability and security of the token's core ownership record on the blockchain itself.

When a wallet or marketplace needs to display a token, it follows a deterministic resolution process: it reads the token's smart contract to obtain the metadata URI, fetches the JSON file from the specified location, and then parses the data according to the expected schema. This process enables seamless interoperability; an NFT minted on Ethereum using the ERC-721 standard can be correctly displayed in any compatible wallet worldwide because all parties agree on the schema's rules. Schema validation tools are often used to ensure the JSON output conforms to the standard before minting, preventing display errors.

Advanced schemas support dynamic metadata, where the attributes can change based on external conditions or on-chain events. For example, a gaming NFT might have its power_level attribute updated by a smart contract after a player achieves a milestone. This is often facilitated by having the metadata URI point to an API endpoint or a smart contract that generates the JSON dynamically, rather than to a static file. Such implementations require careful design to maintain decentralization and trustlessness, often relying on oracles or verifiable on-chain logic to trigger updates.

The evolution of metadata schemas is central to blockchain utility. Newer proposals and implementations focus on composability and on-chain provenance. Projects may embed references to other tokens, verify the authenticity of linked media through cryptographic hashes, or include royalty specifications directly within the metadata. As the ecosystem matures, robust, extensible schemas are critical for enabling complex decentralized applications, gaming assets, and digital identity solutions that move beyond simple collectibles.

ARCHITECTURAL COMPARISON

On-Chain vs. Off-Chain Metadata Storage

A comparison of the core technical and operational characteristics of storing token metadata directly on a blockchain versus using external systems.

FeatureOn-Chain StorageOff-Chain Storage (Centralized)Off-Chain Storage (Decentralized)

Data Location

Immutable ledger (e.g., contract storage, calldata)

Central server or cloud provider (e.g., AWS S3)

Decentralized network (e.g., IPFS, Arweave)

Immutability

Censorship Resistance

Data Availability Guarantee

Storage Cost

High (gas fees per byte)

Low to Moderate (subscription)

Low (one-time fee for permanence)

Update Flexibility

Difficult/Impossible (immutable)

Easy (centralized control)

Versioned via new content IDs

Client Dependency

None (fully self-contained)

High (requires server uptime)

Low (relies on peer-to-peer network)

Typical Reference Method

Direct contract state or event logs

HTTP/HTTPS URL

Content Identifier (CID) or Transaction ID

erc-721-standard
TOKEN METADATA SCHEMA

The ERC-721 Metadata Standard

A standardized JSON schema for describing the visual and functional attributes of a non-fungible token (NFT) on the Ethereum blockchain.

The ERC-721 Metadata Standard is an optional extension to the core ERC-721 specification that defines a structured format for storing and retrieving descriptive information about a non-fungible token. This metadata, which is typically stored off-chain in a JSON file, includes essential properties like the token's name, description, and a pointer to its image or other digital asset. By standardizing this schema, it ensures wallets, marketplaces, and other applications can consistently display and interact with NFTs from different collections, providing a unified user experience across the ecosystem.

The standard specifies a JSON schema with several key fields. The name and description fields provide human-readable identifiers. The image field contains a URI (Uniform Resource Identifier) pointing to the token's visual representation. An optional attributes array allows for custom traits or properties, which are fundamental for profile picture (PFP) projects and generative art. Crucially, the standard also defines the tokenURI function, which smart contracts must implement to return a URI (often an HTTP or IPFS link) where this JSON metadata file can be fetched.

A critical design choice is the separation of the immutable on-chain token identifier from its mutable off-chain metadata. While the token ID on-chain is permanent, the JSON file referenced by tokenURI can be updated, allowing for dynamic NFTs or artwork revisions. However, this introduces a centralization risk if the URI points to a traditional web server. To ensure permanence, developers commonly use decentralized storage solutions like the InterPlanetary File System (IPFS) or Arweave, which provide content-addressed, immutable links for the metadata JSON and the associated media assets.

For developers, implementing the metadata standard involves extending the basic ERC-721 contract with the IERC721Metadata interface and writing the tokenURI function. A common pattern is to use a base URI (e.g., https://ipfs.io/ipfs/QmXyZ/) and concatenate the token ID to form a complete path to each token's unique JSON file. The attributes within the JSON are not enforced on-chain, meaning their validity and the accuracy of the linked assets rely on the integrity of the project creators. This schema has become the universal blueprint for NFT data, enabling the rich ecosystem of digital collectibles and verifiable digital assets we see today.

common-schema-fields
TOKEN METADATA SCHEMA

Common Fields in a Token Metadata Schema

A token metadata schema defines the standardized structure for describing a digital asset's properties, enabling consistent interpretation across wallets, marketplaces, and applications. These fields are typically stored off-chain (e.g., in IPFS or Arweave) and referenced by a URI in the token's on-chain smart contract.

01

Core Identification Fields

These fields uniquely identify the token and its basic attributes.

  • name: The human-readable title of the token (e.g., "Chainscore Governance Token").
  • symbol: The abbreviated ticker symbol (e.g., "CSCORE").
  • description: A detailed explanation of the token's purpose, utility, or the asset it represents.
  • image: The URI pointing to the token's visual representation, such as a logo or artwork. This is the primary field rendered by wallets and explorers.
02

Extended Attributes

Fields that provide additional descriptive context and categorization.

  • attributes: An array of objects defining traits or properties (common for NFTs). Each attribute includes trait_type (e.g., "Rarity", "Background") and value (e.g., "Legendary", "Blue").
  • properties: A more flexible key-value store for arbitrary data, often used for technical details or links to external files.
  • external_url: A link to a website or external page with more information about the token or its project.
03

Standard Compliance & Versioning

Fields that declare adherence to specific metadata standards, ensuring compatibility.

  • Standard Identifiers: Fields like erc721 or erc1155 metadata may be included to signal the token type.
  • schema or standard: May specify the exact metadata schema version used (e.g., referencing a specific IPFS hash of the schema definition).
  • Compliance with these fields allows marketplaces like OpenSea (using OpenSea Metadata Standards) or wallets to correctly parse and display the token.
04

Royalty & Creator Information

Fields that define economic rights and attribution, crucial for creator economies.

  • seller_fee_basis_points: The royalty percentage (e.g., 500 for 5%) owed to the creator on secondary sales.
  • fee_recipient: The wallet address that receives royalty payments.
  • creators: An array listing the artists or developers involved, often including their addresses and contribution shares. These fields are foundational for platforms like Manifold or Foundation.
05

Animation & Media

Fields for tokens that are dynamic or have multiple media components.

  • animation_url: A URI to a multi-media asset (e.g., HTML page, MP4 video, 3D model) that represents the token. Takes precedence over the image field in supporting viewers.
  • youtube_url: A link to a related YouTube video.
  • background_color: A hex color code (e.g., "#FFFFFF") for the background of the token's display card in some marketplaces.
06

Example: ERC-721 Metadata JSON

A concrete example showing how these fields come together in a standard like ERC-721.

json
{
  "name": "Galactic Ape #123",
  "description": "A unique ape explorer from the Galactic Ape Collection.",
  "image": "ipfs://QmXx.../ape123.png",
  "external_url": "https://galacticapes.io/ape/123",
  "attributes": [
    { "trait_type": "Background", "value": "Nebula" },
    { "trait_type": "Fur", "value": "Gold" }
  ]
}

The on-chain token's tokenURI() method returns a link (URI) to this JSON document.

ecosystem-usage
ECOSYSTEM USAGE AND PROTOCOLS

Token Metadata Schema

A token metadata schema is a standardized data structure that defines the attributes and properties of a fungible or non-fungible token (NFT) on a blockchain, enabling wallets, explorers, and marketplaces to correctly display and interpret token information.

01

Core Data Fields

A standard schema defines essential fields for token identification and presentation. Key fields include:

  • name: The human-readable name of the token (e.g., "Wrapped Ether").
  • symbol: The ticker symbol (e.g., "WETH").
  • decimals: The number of decimal places used to represent token amounts.
  • description: A textual description of the token's purpose.
  • image: A URI pointing to a logo or artwork representing the token.
02

ERC-721 & ERC-1155 Metadata

For NFTs, metadata schemas are more complex, defining unique attributes. The ERC-721 Metadata JSON Schema and ERC-1155 Metadata URI standards specify fields like:

  • tokenId: The unique identifier of the NFT.
  • attributes: An array of trait objects (e.g., {"trait_type": "Background", "value": "Blue"}) used for rarity and display.
  • animation_url: A URI to multimedia content (e.g., HTML, video). These are typically stored off-chain (e.g., on IPFS) and referenced by a URI in the smart contract.
03

Off-Chain Storage (IPFS)

Due to cost and size limitations, detailed metadata is rarely stored directly on-chain. Instead, a JSON file following the schema is stored off-chain on decentralized storage like IPFS or Arweave. The smart contract stores only a base URI or a token-specific URI (like ipfs://QmX.../1.json) that points to this file. This ensures data permanence and decentralization, critical for the longevity of NFTs.

04

The `tokenURI` Function

The primary on-chain interface for retrieving metadata. In ERC-721 and ERC-1155 contracts, the tokenURI(uint256 tokenId) function returns a URI (Uniform Resource Identifier) pointing to the token's JSON metadata file. Wallets and marketplaces call this function to fetch and render the token's name, image, and attributes. A broken or incorrect tokenURI will cause the token to appear as "broken" in user interfaces.

05

ERC-20 Token Lists

For fungible tokens (ERC-20), decentralized schemas like the Token Lists standard aggregate metadata for easier discovery. A Token List is a JSON file containing an array of token definitions, each with the standard schema fields (name, symbol, decimals, logoURI). Projects like Uniswap and CoinGecko maintain lists, allowing DApps to pull verified token logos and info without relying on centralized APIs.

06

Importance for Interoperability

A standardized schema is crucial for ecosystem interoperability. It allows:

  • Wallets (MetaMask, Rainbow) to display consistent token information.
  • Marketplaces (OpenSea, Blur) to list and filter NFTs by attributes.
  • Analytics Tools to index and categorize token data correctly.
  • Bridges & Wrappers to preserve metadata when moving assets across chains. Without it, each application would need custom parsers, fragmenting the user experience.
TECHNICAL DETAILS AND EXTENSIONS

Token Metadata Schema

Token metadata schemas define the structure and standards for describing the properties of fungible and non-fungible tokens on-chain and off-chain. This section details the core specifications, extensions, and technical implementation patterns.

The ERC-721 Metadata JSON Schema is a standardized format for describing the properties of a Non-Fungible Token (NFT) off-chain. It is defined as an extension to the core ERC-721 standard (ERC-721 Metadata) and provides a common structure for applications like marketplaces and wallets to fetch and display token information consistently. The schema includes required fields like name, description, and image, as well as optional fields such as attributes (an array of trait objects) and external_url. The metadata is typically stored as a JSON file at a URI returned by the token contract's tokenURI method, which can point to decentralized storage (e.g., IPFS) or a centralized server. This separation of on-chain token ownership from off-chain descriptive data is a fundamental pattern in the NFT ecosystem.

Example Structure:

json
{
  "name": "Token Name",
  "description": "A description of the token.",
  "image": "ipfs://Qm.../image.png",
  "attributes": [
    { "trait_type": "Background", "value": "Blue" }
  ]
}
security-considerations
TOKEN METADATA SCHEMA

Security and Reliability Considerations

A well-defined token metadata schema is critical for ensuring the security of applications and the reliability of data across the ecosystem. These considerations address common vulnerabilities and operational risks.

01

Centralized URI Risks

A primary vulnerability is a centralized metadata URI (e.g., https://example.com/token/1.json). If the host server is compromised, goes offline, or changes the data, the token's properties can be altered or lost. This breaks the immutability guarantee of the underlying blockchain. Mitigations include using IPFS or Arweave for decentralized storage, or implementing on-chain metadata for critical attributes.

02

Schema Validation & Integrity

Applications must validate the structure and content of fetched metadata to prevent injection attacks or malformed data from crashing systems. Key practices include:

  • JSON Schema Validation: Enforcing a strict schema (like ERC-721's optional metadata extension) to ensure required fields (name, image) are present and correctly typed.
  • Content Hash Verification: Using a hash field within the metadata to verify the integrity of linked image or animation files, ensuring they haven't been tampered with after publication.
03

Rendering & Phishing Attacks

Malicious metadata can be used in social engineering attacks. A common vector is a malicious external_url or image field that points to a phishing site or loads harmful content into a wallet's or marketplace's UI. Wallets and explorers must sanitize and carefully render all metadata fields, treating them as untrusted user input. The ERC-721 Metadata Standard recommends that clients protect users from potentially harmful media.

04

Upgradability and Freezing

Some token standards (e.g., ERC-721 with a baseURI) allow for metadata updates, creating a trust assumption about the contract owner. A malicious or compromised owner can change the metadata for all tokens. Freezable metadata is a feature where a permanent, immutable hash is stored on-chain after finalization. Projects should clearly communicate their metadata mutability policy (immutable, owner-updatable, decentralized).

05

Performance & Availability

Reliability depends on the availability of metadata servers. Slow or rate-limited centralized APIs can degrade application performance. Decentralized storage like IPFS relies on a robust pinning service and gateway infrastructure to ensure high availability. Best practices include:

  • Using redundant gateways (e.g., Cloudflare's IPFS gateway, public.ipfs.io).
  • Implementing client-side caching with appropriate TTLs to reduce fetch latency and load.
06

Standardization & Interoperability

A lack of schema standardization forces each application (wallets, marketplaces, explorers) to implement custom parsing logic, increasing the attack surface and potential for errors. Widely adopted standards like ERC-721 Metadata JSON Schema and ERC-1155 Metadata URI provide a reliable baseline. Extensions for traits (ERC-721A), royalties (ERC-2981), and other properties should be integrated following established patterns to ensure cross-platform compatibility and security.

TOKEN METADATA SCHEMA

Frequently Asked Questions (FAQ)

A Token Metadata Schema is a standardized data structure that defines the properties and attributes of a fungible or non-fungible token (NFT) on a blockchain. This FAQ addresses common questions about its components, standards, and practical applications.

A Token Metadata Schema is a structured data model that defines the properties, attributes, and visual representation of a token on a blockchain. It acts as a blueprint, specifying the required and optional fields—such as name, description, image, and custom traits—that describe a token's identity and characteristics. This schema is crucial because on-chain storage is expensive; typically, only a unique token ID and owner address are stored directly on the chain, while the detailed metadata is stored off-chain (e.g., in a JSON file on IPFS) and referenced via a URI. Standardized schemas, like those defined by ERC-721 for NFTs or ERC-1155 for multi-tokens, ensure interoperability across wallets, marketplaces, and applications by providing a predictable data structure that clients can parse and display consistently.

ENQUIRY

Get In Touch
today.

Our experts will offer a free quote and a 30min call to discuss your project.

NDA Protected
24h Response
Directly to Engineering Team
10+
Protocols Shipped
$20M+
TVL Overall
NDA Protected Directly to Engineering Team
Token Metadata Schema: Definition & Standards (ERC-721) | ChainScore Glossary