Why You Are Here
You need a unique identifier. A record, a key, or an object needs an ID that will not collide with any other, without asking a central server for the next number.
You need an idempotency or request key. An API call or a message needs a unique token so a retry is not processed twice.
You need test data or many IDs at once. You want a batch of GUIDs to seed a database, populate a fixture, or fill a set of records during development.
What This Tool Does
This GUID generator creates standard 128-bit identifiers, written as 32 hexadecimal digits in the familiar 8-4-4-4-12 grouping, one at a time or in bulk. Generate, copy, and drop them into your records, keys, or test data.
GUID and UUID Are the Same Thing
The two names cause needless confusion, so it is worth settling first.
Two names, one format
GUID stands for globally unique identifier and is the term Microsoft uses. UUID stands for universally unique identifier and is the term the standard uses. They describe the identical 128-bit value, so a GUID and a UUID are interchangeable.
The familiar shape
A GUID is written as 32 hexadecimal digits in five groups, 8-4-4-4-12, such as 550e8400-e29b-41d4-a716-446655440000. A few of those digits encode the version and variant; the rest carry the identifier's data.
The Versions
Not all GUIDs are made the same way. The version changes how the value is generated and what it is good for.
|
Version |
How it is made |
Best for |
|---|---|---|
|
v4 (random) |
122 random bits |
General-purpose IDs, the common default |
|
v1 (time + node) |
Timestamp plus a node value |
Legacy systems; can leak time and MAC |
|
v7 (time-ordered) |
Unix time plus random |
Database keys that should sort by creation |
v4 is the default, v7 is the modern database choice
Most tools generate version 4, which is random and ideal when you just need a unique value. Version 7, standardised in RFC 9562, embeds a timestamp so the IDs sort in creation order, which matters for database keys, as Section 6 explains.
Uniqueness Is Extremely Likely, Not Guaranteed
This is one honest point people gloss over. A GUID is designed to be unique, but the guarantee is statistical, not absolute, and it depends on good randomness.
The odds are astronomically small
A version 4 GUID has 122 random bits, so the chance of two independently generated values colliding is so small it is safe to ignore in practice. You would need to generate billions of GUIDs before a collision became remotely plausible.
But it rests on the quality of the randomness
The uniqueness holds only if the random bits are genuinely unpredictable. A generator built on a weak random source can produce repeats far sooner, which is why a GUID tool should use the browser's cryptographic random source, not a basic one.
Still add a database constraint
Because the guarantee is probabilistic, a primary key column should carry a unique constraint anyway. It costs nothing and turns an all-but-impossible collision into a caught error rather than silent corruption.
v4 Versus v7 for Database Keys
The practical decision that matters most, and where the honest recommendation has changed.
Random v4 keys hurt database indexes
Because v4 values are random, consecutive inserts land in random positions in a database's index, causing page splits and poor cache locality. On a large, busy table this fragments the index and slows writes.
v7 keys sort by time and behave better
A version 7 GUID starts with a timestamp, so new IDs are always larger than older ones and inserts append to the end of the index, much like an auto-incrementing key, while keeping the benefits of a GUID. For a new system, v7 is the better default for primary keys.
Use v4 when order should not leak
The flip side is that v7 reveals roughly when an ID was created. If you do not want a public identifier to expose creation time or order, v4's randomness is the safer choice.
A GUID Is an Identifier, Not a Secret
The security point, because GUIDs are often misused as if they were passwords or unguessable tokens.
It is meant to be unique, not secret
A GUID's job is to avoid collisions, not to resist guessing. Version 1 and version 7 even contain a timestamp, so they are partly predictable. Treating a GUID as a secret capability token can expose data if someone enumerates or guesses nearby values.
Use a real secret for security
For a password, an API key, a session token, or an unguessable link, use a value from a cryptographically secure generator designed for secrets, such as the Password Generator, not a GUID. A version 4 GUID is hard to guess, but it was not designed to be a secret and should not be relied on as one.
Common Mistakes to Avoid
Random v4 GUIDs scatter across a database index and cause page splits and fragmentation on large tables, slowing inserts. For a primary key in a new system, prefer a time-ordered version 7 GUID, which appends in order and behaves like an incrementing key.
A GUID is built to be unique, not unguessable, and v1 and v7 even embed a timestamp. Using one as a security token or a private link can leak data if values are guessed or enumerated. Generate real secrets with a cryptographic tool such as the Password Generator instead.
GUID uniqueness is statistical, not absolute, and it depends on a strong random source. Keep a unique constraint on any key column so that the all-but-impossible collision, or a weak-randomness repeat, surfaces as an error rather than corrupting data silently.
Quick Reference
|
Item |
Detail |
|---|---|
|
Also called |
UUID (GUID is Microsoft's name) |
|
Size |
128-bit, 32 hex digits, 8-4-4-4-12 |
|
Default version |
v4, fully random |
|
Database keys |
Prefer v7, time-ordered |
|
v1 |
Older, can leak time and node |
|
Uniqueness |
Statistical, add a constraint |
|
Random source |
Should be cryptographic |
|
Secret? |
No, it is an identifier |
|
For secrets |
Use the Password Generator |
|
Runs |
100% in the browser, nothing stored |
