UUID basics
A UUID is a 128-bit identifier commonly shown as a hexadecimal string with hyphens. Random UUIDs are widely supported and useful when you need low collision risk without central coordination.
UUID v7 and ULID
UUID v7 and ULID include time-ordering behavior, which can make logs, database records, and event streams easier to sort. They are helpful when creation order matters, but you should confirm compatibility with your storage and libraries.
Common mistakes
Identifiers are not access control. Do not rely on an ID being hard to guess as the only protection for private records or files.
FAQ
Should every project use sortable IDs?
No. Use the format that matches your database, interoperability needs, and operational constraints.
Are generated IDs secrets?
No. Treat them as identifiers, not credentials.