If you store them in the database you can check for uniqueness too.
Hashids suggests creating lots of IDs before you use it in production to ensure that you don't get duplicates for your use case.
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I`m going to use hashids instead of database ids in my urls, should I dedicate a field to them in database table or encode ids to hashids on url generation and decode hashids to ids on incoming requests?
Hey guys,
Hashids creator here. Wanted to weigh in on a few points:
Please or to participate in this conversation.