How to generate UUIDs
- Choose the type of ID: UUID v4, UUID v7, ULID or NanoID.
- Set how many you need (up to 1,000) and the format options.
- Copy the list, or click Generate for a fresh batch.
UUID versions at a glance
- v1: timestamp plus the machine's MAC address. Leaks hardware info; avoid for new systems.
- v4: 122 random bits. The default choice when order does not matter.
- v6: like v1 but reordered so it sorts by time.
- v7: Unix milliseconds plus random bits (RFC 9562). Sortable and great for database keys.
Frequently asked questions
Which UUID version should I use?
Use UUID v4 when you just need a random unique ID. Use UUID v7 for database primary keys: it starts with a timestamp, so new IDs sort after old ones and keep B-tree indexes compact.
Can two generated UUIDs collide?
In practice, no. A v4 UUID has 122 random bits. You would need to generate about a billion UUIDs per second for 85 years to reach a 50% chance of a single collision.
What are ULID and NanoID?
ULID is a 26-character, time-sortable ID in Crockford Base32, similar in purpose to UUID v7. NanoID is a short random ID (21 characters by default) using a URL-safe alphabet, handy for public-facing IDs.
Are these IDs secure?
They are generated with the browser's cryptographically secure random number generator (crypto.getRandomValues). Still, do not use IDs as secrets or access tokens.