UUID Generator
Generate UUID v4, time-ordered UUID v7, or ULIDs in bulk.
| Type | UUID v4 (random) |
|---|---|
| Generated | 5 |
| Entropy | 122 random bits |
| Sortable by time | No |
e7ad1ef2-a07f-4805-8c30-83f9f58a4821 adc3a331-2dff-40c5-b1be-acdad4b6efd9 9a47fac5-d070-4280-a389-882d9202d9b0 6caa1656-b939-47b4-911e-5c2595ea4fb5 3399332f-e1ed-4c89-8821-bf2eeed8244b
Generate universally unique identifiers — up to 100 at a time. Three formats are available: the familiar random UUID v4, the newer time-ordered UUID v7, and ULID, a compact sortable alternative.
All randomness comes from the operating system's cryptographically secure generator, so these are safe to use as unguessable identifiers in URLs and API responses.
How it works
A UUID is a 128-bit value written as 32 hexadecimal digits in five dash-separated groups. The point is that anyone can generate one independently, with no coordination and no central authority, and still be confident it will never collide with anyone else's.
The version you choose matters more than most people expect:
- v4 is 122 random bits. It is the default nearly everywhere, and the right choice when the identifier will be public or must be unguessable. Its weakness is that consecutive values are unrelated.
- v7 puts a millisecond timestamp in the leading bits, so identifiers sort chronologically while staying unguessable in the remainder. This matters enormously for database performance: random v4 keys scatter inserts across a B-tree index, causing page splits and index fragmentation, while v7 keys append in order. If you are using UUIDs as primary keys, prefer v7.
- ULID solves the same problem as v7 but encodes 128 bits in 26 Crockford base-32 characters instead of 36. It is shorter, case-insensitive, and avoids visually ambiguous characters, which makes it pleasant in URLs.
On collisions: the probability of two random v4 UUIDs colliding is negligible in any realistic system. You would need to generate roughly 2.7 × 1018 of them before reaching a one-in-a-billion chance of a single duplicate.
Frequently asked questions
Which UUID version should I use?
Use v7 for database primary keys, because they sort by creation time and keep index inserts sequential. Use v4 when the identifier is public-facing and must reveal nothing, including when it was created. ULID is a good v7 alternative when a shorter string matters.
Can two UUIDs ever be the same?
In theory yes, in practice no. A v4 UUID has 122 random bits. You would need to generate about 2.7 quintillion of them before there was even a one-in-a-billion chance of a single collision.
Are these safe to use as secret tokens?
A v4 UUID is generated from cryptographically secure randomness, so it is unguessable. But it is not secret by design — it often appears in logs and URLs. For session tokens or API keys, use a purpose-built random string instead.
What is the difference between a UUID and a GUID?
Nothing meaningful. GUID is Microsoft's name for the same 128-bit identifier. They are interchangeable, though Microsoft tooling sometimes displays them in braces or uppercase.
Why do UUID primary keys hurt database performance?
Random v4 values arrive in no order, so each insert lands at a random point in the index and causes page splits and fragmentation. Time-ordered v7 or ULID values append at the end instead, which is why they are now the recommended choice for keys.
Does the timestamp in v7 leak information?
Yes — a v7 UUID reveals its creation time to the millisecond. That is usually harmless and often useful, but if creation time is sensitive, use v4 instead.
Related tools
Hash Generator
Generate MD5, SHA-1, SHA-256, SHA-512, SHA-3 and CRC32 hashes at once.
Developer UtilitiesPassword Generator
Generate strong random passwords or memorable passphrases.
SecurityRandom Number Generator
Generate secure random numbers, integers, and decimals within a specific range.
Developer UtilitiesUnix Timestamp Converter
Convert Unix timestamps to dates and back, in any timezone.
Developer UtilitiesBase64 Encode / Decode
Encode text to Base64 or decode it back, including URL-safe Base64.
Developer UtilitiesSlug Generator
Convert any text into a URL-friendly slug.
Developer UtilitiesNeed hosting that just works?
Free SSL, daily backups and 24×7 support on every Loudhost plan.