Skip to main content

What is an IPFS CID?

Legacy: This page documents Filebase's IPFS tier. For new deployments, use the S3-compatible object storage tier with the s3.filebase.io endpoint.

A Content Identifier (CID) is the unique value used to reference a file or folder stored on IPFS. The CID is derived from the cryptographic hash of the content itself, which has two important consequences:

  • The same content uploaded twice produces the same CID.
  • Any change to the content — even one byte — produces a different CID.

This makes IPFS content addresses self-verifying: a client can hash what it receives and confirm it matches the CID it asked for.

CID v0 vs. CID v1

v0v1
Length46 charactersVariable
EncodingBase58Configurable (Base32 default)
PrefixAlways Qmbafy... or bafk... typical
Subdomain-safeNoYes

Use CID v1 for new projects. It's required for subdomain gateways and is the IPFS ecosystem default going forward.

Conversion

Many tools can convert between v0 and v1. For example:

v0: QmbWqxBEKC3P8tqsKc98xmWNzrzDtRLMiMPL8wBuTGsMnR
v1: bafkreidgvpkjawlxz6sffxzwgooowe5yt7i6wsyg236mfoks77nywkptdq

Both refer to the same underlying content.

Using CIDs

Once you have a CID, fetch the content via any IPFS gateway:

https://ipfs.filebase.io/ipfs/{CID}

Or natively in IPFS-aware applications:

ipfs://{CID}

A single CID can address a single file or a directory tree.

CIDs are public

Anything addressable by a CID is public by definition — anyone with the CID can fetch the content from any IPFS gateway. There are no permissions, user accounts, or access controls on CIDs themselves.

For private storage, use the S3-compatible object storage tier with a private bucket and pre-signed URLs.

What's next