Content Identifiers (CIDs)

A content identifier is a value that addresses a single piece of content in IPFS. It is mainly a cryptographic hash of the content, but is encoded as a multihash and multicodec. (Note: older CIDs have a different design — see version 0 below.)

You can read up on the details in the CID spec. You might also want to check out the CID inspector for an interactive breakdown of CIDs.

Version 1

Version 1 is the latest version of CID. It is used by default for files (MFS) and object operations.

Version 0

When IPFS was first designed, we used base 58-encoded multihashes as the content identifiers. (This is simpler, but much less flexible than newer CIDs.) It is still used by default when adding files and blocks to IPFS, so you should generally try to support them.

The CID specification includes a decoding algorithm you can use to distinguish CID v0 from newer versions.