English
English
Appearance
English
English
Appearance
The unique fingerprint every IPFS file receives.
| Property | CIDv0 | CIDv1 |
|---|---|---|
| Prefix | Qm... | bafy... (dag-pb, directories & multi-chunk files), bafk... (raw, small single-block content), plus others per codec |
| Hash function | SHA-256 only | Multiple (SHA-256, Blake2b, etc.) |
| Encoding | Base58 (mixed case) | Multibase — base32 by default (lowercase, DNS-safe) |
| Self-describing | No | Yes (includes codec + hash info) |
| Chunker | 256 KiB legacy default | 1 MiB per IPIP-0499 |
| Leaf encoding | Wrapped in dag-pb | Raw bytes (raw-leaves=true) |
Uploads and pins made after 2026-07-13 return CIDv1 by default: CIDv1 base32 encoding, 1 MiB chunks, raw leaves — the IPIP-0499 unixfs-v1-2025 profile. Practical implications:
bafk... (raw single-block CIDv1)bafy... (dag-pb CIDv1)ipfs-car) would compute from the same bytesLegacy Qm... CIDs from earlier uploads remain fully resolvable — the gateway, POST /pin, GET /file/:cid, IPNS resolvers, and every other endpoint accept both formats indefinitely. If you have a Qm... CID from an earlier upload, nothing you built stops working.
A Content Identifier (CID) is a self-describing label that uniquely identifies a piece of data on IPFS. It's derived from the cryptographic hash of the file's content, combined with metadata about the hashing algorithm and encoding format used.
bafybeigdyrzt5sfp7udm7hu76uh7y26nf3efuylqabf3oclgtqy55fbzdiCIDs that start with bafy (or bafk for small single-block content) use CIDv1, the modern self-describing format. Legacy CIDs that start with Qm use CIDv0 (base58-encoded SHA-256) — still valid, still resolvable, but no longer the default output for new content.
Every file you upload returns a CID in the API response. Use it to:
ipfs.ninja/ipfs/<CID>GET /file/<CID>See the IPFS.NINJA overview for how CIDs fit into the upload workflow. Learn how to pin content by CID to keep it permanently accessible.