Datatypes

Decentralized identifier (DID)

ID did

DatatypeNot PIIidentifierDraft

This record is a draft: it has not been reviewed yet and may be incomplete or wrong. Do not rely on it for compliance decisions. Help improve it (see CONTRIBUTING.md).

Identifier defined by the W3C Recommendation Decentralized Identifiers (DIDs) v1.0 (2022). It has the form did:<method>:<method-specific-id>. The method name is lowercase letters and digits, such as web, key or plc, and the method decides how the identifier resolves to a DID document with keys and service endpoints. The method-specific part uses letters, digits, period, hyphen, underscore, percent-encoded bytes and colons, and does not end with a colon. A DID followed by a path, query or fragment is a DID URL, which the regexp does not accept. Bluesky and the AT Protocol identify accounts with did:plc and did:web DIDs.

Parent datatype
Uniform Resource Identifier (URI) uri
Categories
Universal unique identifiers
Countries
Global (not tied to a country)
Languages
Common to most languages
Bioregistry
did
Quality
90/100 · missing: detector coverage
Metacrafter rules
no detection rule yet
Supported by tools
no tool record lists this type yet

Regular expression

^did:[a-z0-9]+:(?:(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})*:)*(?:[A-Za-z0-9._-]|%[0-9A-Fa-f]{2})+$

Python re syntax.

Examples

ValueDescription
did:example:123456789abcdefghiExample 1 of the W3C DID specification
did:web:w3c-ccg.github.iodid:web method specification
did:web:example.com%3A3000:user:alicedid:web with an encoded port and a path, did:web method specification
did:Example:123456789abcdefghi invalidUppercase letter in the method name
did:example:123456/path invalidDID URL with a path
did:example: invalidEmpty method-specific identifier

Translations

LanguageNameDescription
RussianДецентрализованный идентификатор (DID)

Sources

Use this record