ExampleAddress

ERC-1155 URI examples and the {id} placeholder

When an ERC-1155 metadata URI contains {id}, clients replace it with the token ID as lowercase hexadecimal, padded to 64 characters without 0x.

Worked example

ERC-1155 URI examples and the {id} placeholder: annotated comparison
InputIllustrative valueMeaning
Token ID42Decimal integer
Hexadecimal2aSame value
Padded suffix000000000000000000000000000000000000000000000000000000000000002a.json64 hex digits before .json
Templatehttps://example.invalid/{id}.jsonReserved placeholder domain

Work the substitution

Convert decimal 42 to hex 2a. Add 62 zero characters on the left, then replace the literal {id} in the URI. Do not insert decimal 42 or include a 0x prefix. The example.invalid URL is explanatory and is not a fetched metadata endpoint.

Interpret the response separately

The URI locates metadata; it is not an ownership record. A working response does not prove the contract is authentic. Read the contract and chain identity first, then inspect whether the metadata format matches the collection’s implementation.

Common pitfalls

  • Not every URI contains an {id} substitution marker.
  • Do not confuse a 64-character ID component with an EVM transaction hash.

Related references

Primary sources

Examples explain identifiers. They are not investment recommendations.