How to Generate a UUID
A UUID is a 128-bit identifier you can create anywhere, on any machine, without asking a central authority whether it is already taken. That property is what makes it so useful in distributed systems — two servers generating IDs simultaneously will not collide, because the space is large enough that a collision is not going to happen. Pick a version, choose how many you need, and copy.
Choose the version
Version 4 for general identifiers, version 7 when the UUID will be a database primary key.
Set the format and count
Standard hyphenated form, or compact, braced or URN if a system requires it. Generate up to a hundred at once.
Copy what you need
Click any single UUID to copy it, or take the whole list at once.
Version 7 and Why It Matters for Databases
Version 4 UUIDs are entirely random, which is exactly what you want for an identifier that reveals nothing. It is also, as a database primary key, quietly expensive. Database indexes are ordered structures, and a random key means every insert lands in an unpredictable position — a different page of the index each time. On a large table this causes page splits, index fragmentation and a steadily worsening write path.
Version 7 puts a millisecond timestamp in the first 48 bitsand fills the rest with randomness. The result still cannot be guessed or enumerated meaningfully, but consecutive UUIDs now sort in creation order. Inserts append to the end of the index instead of scattering through it, which removes the fragmentation problem entirely. As a bonus, sorting by ID sorts by creation time, and you can read the timestamp back out — which is what the inspector on this page does.
The trade-off is that v7 leaks creation time. That is usually harmless and often useful, but if an identifier appears in a public URL and the timing is sensitive, v4 is the safer choice. For anything internal, and for any table that will grow large, v7 is the better default.
Common Questions About UUIDs
Can two UUIDs ever collide?
In principle yes, in practice no. You would need to generate about a billion v4 UUIDs per second for eighty years to reach even a fifty percent chance of one duplicate.
Are they secret?
No. A UUID is unguessable but not a secret - it appears in URLs and logs. Never use one in place of an access token or a password.
Why 36 characters?
Thirty-two hexadecimal digits representing the 128 bits, plus four hyphens that group them in the standard 8-4-4-4-12 pattern.
What are the nil and max UUIDs?
Defined constants of all zeros and all ones. They are useful as explicit 'none' and 'everything' sentinel values rather than as identifiers.
Frequently Asked Questions
How do I generate a UUID for free?
Choose a version, set how many you need, and copy. Free, no signup, and generated entirely in your browser.
What is the difference between UUID v4 and v7?
v4 is fully random. v7 starts with a millisecond timestamp, so UUIDs sort in creation order - which is far better for database indexes.
Which version should I use?
v4 for general identifiers where the creation time should not be visible. v7 for database primary keys, especially on tables that will grow large.
Can two UUIDs be the same?
The probability is negligible. You would need to generate around a billion per second for decades before a collision became likely.
Is a UUID secure enough to use as a token?
No. UUIDs are unguessable but not secret, and they appear in URLs and logs. Use a proper token for authentication.
Does v7 leak information?
It reveals the creation time, which is usually harmless and often useful. Use v4 if the timing must stay private.
Are these generated on a server?
No. They are created in your browser using its cryptographic random number generator and never transmitted.
What is the nil UUID for?
It is an all-zero UUID defined as an explicit empty value, useful as a sentinel rather than as an identifier.
Can I generate UUIDs in bulk?
Yes, up to a hundred at a time, which you can copy together or download as a text file.
What do the different formats do?
They match what different systems expect - braces for Microsoft tooling, URN for XML contexts, compact when hyphens are unwanted.
How do I check what version a UUID is?
Paste it into the inspector. It reports the version and variant, and for v7 decodes the creation timestamp.
Is this UUID generator really free?
Completely free, with no limits, no signup and no premium wall. Everything runs in your browser.
Last updated: July 21, 2026 · FlipMyFormat UUID Generator
Written and maintained by the FlipMyFormat team
