CUID2 generator
Generate up to 100 CUID2s. Keep the default 24-character length or choose your own.
Store these with a unique constraint in your database.
IDs are generated on our server. For production use, generate them in your application.
Implementation details
Uses @paralleldrive/cuid2@3.3.0.
Choosing a length
A default CUID2 looks like tz4a98xxat96iws9zmbrgj3a. It starts with a lowercase letter and has no readable timestamp. Shorter IDs have a smaller output space; check collision risk at your expected volume before reducing the length.
Use CUID2 for record IDs with a unique database constraint. An ID does not grant access to a record and is not a replacement for a session or password-reset token.