UUID / ULID generator
Create one ID or a batch of IDs for database rows, events, logs, URLs, and test fixtures.
What is a UUID?
A UUID is a 128-bit identifier commonly rendered as 32 hexadecimal characters separated by hyphens. It is designed for practical uniqueness without asking a central service for the next ID.
What is a ULID?
A ULID is a lexicographically sortable alternative to UUIDs that keeps the same 128-bit size while producing IDs that are easier to sort by time.
Frequently asked questions
Can UUID v4 ever collide?
Theoretically yes, but the probability is so small that it is negligible for practical application workloads.
Should I use UUID or ULID?
Use ULID when time ordering matters. Use UUID v4 when you want the most familiar and widely supported random identifier format.
Is this generator safe?
Yes. The IDs are generated locally in the browser and are not sent to a server.
Can I use a UUID as a secret token?
Do not treat ordinary UUIDs as secrets. They are identifiers, not authentication credentials. Password reset links, API keys, and session secrets should use purpose-built cryptographic tokens.
Why do some teams prefer ULID for database records?
ULIDs sort by creation time, which can make logs, event streams, and some indexes easier to inspect. The tradeoff is that generation time is visible in the ID.