ERC-8127 · Draft · ERC · 2026-01-14
ERC-8127: Human Readable Token Identifiers
A string format like `alias.tokenId@registry` that names any token (NFT, real-world asset, AI agent) in a way people can read while staying globally unique across chains.
What problem does it solve?
Tokens that represent individual things (NFTs, tokenized real-world assets, registered AI agents) are uniquely identified by a contract address, a chain and a numeric token ID. That is precise, but terrible for humans: nobody wants to read out a 40-character hex address to refer to "agent 42".
Existing formats such as CAIP-19 (eip155:1/erc721:0x06012c…/771769) push the part a person cares about, the token ID, to the end of a long opaque string. ERC-8127 defines a format that puts the human-readable parts first and the machine location last.
How it works
A Token Identifier looks like:
[<alias>.]<token-id>@<registry>
- alias (optional, recommended): a label of lowercase
a-z, digits and hyphens, not starting or ending with a hyphen. Case-insensitive. It can come from registry metadata (for example an agent'snamein ERC-8004) or be self-assigned by a client. Aliases do not need to be unique. - token-id (required): the token's non-negative integer ID, written in decimal.
- registry (required): the registry contract as an ERC-7930 interoperable address, written as lowercase hex. Because ERC-7930 encodes the chain as well as the address, one field covers both.
Uniqueness comes from token-id@registry; the alias is only a readability hint. The canonical form always includes token ID and registry, includes the alias when available, and is all lowercase.
Clients may accept shorter forms when the context is unambiguous: just webdev (alias only) in a small list, or punk.2344 (alias + ID) within one known registry. This is especially handy for multi-token registries such as ERC-1155 or ERC-6909, where one contract issues many IDs.
Sample code
Examples from the spec:
webdev.42@0x00010000010114d8da6bf26964af9d7eed9e03e53415d37aa96045 canonical, with alias
42@0x00010000010114d8da6bf26964af9d7eed9e03e53415d37aa96045 canonical, no alias
punk.2344 short form (alias + id)
A minimal parser in TypeScript:
const LABEL = /^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/;
function parseTokenId(input: string) {
const s = input.toLowerCase();
const [left, registry] = s.split("@") as [string, string | undefined];
const dot = left.lastIndexOf(".");
const alias = dot >= 0 ? left.slice(0, dot) : /^\d+$/.test(left) ? undefined : left;
const tokenId = dot >= 0 ? left.slice(dot + 1) : /^\d+$/.test(left) ? left : undefined;
if (alias !== undefined && !LABEL.test(alias)) throw new Error("bad alias");
if (tokenId !== undefined && !/^\d+$/.test(tokenId)) throw new Error("bad token id");
if (registry !== undefined && !/^0x[0-9a-f]+$/.test(registry)) throw new Error("bad registry");
return { alias, tokenId: tokenId && BigInt(tokenId), registry };
}
Things to know
- Status: Draft. The format may still change.
- Never trust the alias. Anyone can claim any alias, and duplicates are allowed. Implementations must not use it for authentication or authorization and should show the full
token-id@registryfor security-relevant decisions. - The registry can be any contract. Clients should check it against an allowlist or another trust mechanism.
- Alias-only matching is backwards compatible with existing name-based systems, but clients should warn when an alias matches more than one token.