A Content Identifier (CID) is a self-describing, cryptographic label used in the InterPlanetary File System (IPFS) and related protocols to uniquely and permanently address a piece of content based on its cryptographic hash rather than its location. CIDs encode the hash function used, the hash digest, and the codec describing the data format, enabling content-addressed storage where identical content always produces the same identifier regardless of where it is stored. CIDs are the primary addressing primitive of the IPLD (InterPlanetary Linked Data) ecosystem.
Content
- CIDs were designed by Protocol Labs as part of the IPFS project beginning around 2014. CIDv0 (base58-encoded SHA2-256 multihash) was the initial format and remains compatible with many tools. CIDv1, introduced as the modern standard, adds a multibase prefix and multicodec field, allowing support for different hash algorithms (SHA3, BLAKE2, BLAKE3) and codecs (dag-cbor, dag-json, raw). The separation of codec from hash enables IPLD to address any data structure deterministically.
- Technically, a CIDv1 consists of: (1) a multibase prefix indicating the string encoding (e.g. ‘b’ for base32); (2) a version byte (‘1’); (3) a multicodec varint identifying the data format (e.g. 0x70 for dag-pb, 0x71 for dag-cbor); and (4) a multihash encoding the hash function and its digest. The result is a self-contained, future-proof identifier. Libraries such as go-cid, js-multiformats, and py-cid implement the spec across major languages, and the format is standardised by the Multiformats project.
- Within the IPFS ecosystem, CIDs are resolved by querying the Distributed Hash Table (Kademlia-based) to find providers, then fetching and verifying the content block against the CID’s embedded hash. Filecoin uses CIDs to reference sealed sectors and piece commitments in its storage deals. NFT platforms (OpenSea, Foundation, Zora) rely on IPFS CIDs to store image assets and JSON metadata, though pinning reliability remains a community concern addressed by services such as Pinata, nft.storage, and web3.storage.
- As of 2024–2025, CIDs underpin a growing body of decentralised infrastructure beyond simple file storage. The Interplanetary Virtual Machine (IPVM) uses CIDs to address deterministic computation results, enabling verifiable, content-addressed compute. IPLD schemas and ADLs (Advanced Data Layouts) enable structured data querying across CID-linked graphs, moving toward a decentralised knowledge graph vision. Decentralized Storage networks continue maturing, with Filecoin and Arweave both converging on CID-compatible addressing schemes.