Sqids (formerly Hashids) Generate Short IDs from Numbers
Sqids (pronounced “squid”) is an open-source library that lets you generate YouTube-looking IDs from numbers. These IDs are short, can be generated from a custom alphabet and are guaranteed to be collision-free.
Source: Sqids (formerly Hashids) Generate Short IDs from Numbers
I’ve used these before. They’re nice for the right use case, but in practice, I’ve found that people (including me!) get confused about how lookups work. It’s much simpler to have a separate short ID field.