About the GUID Generator
A GUID is Microsoft naming for the same 128 bit identifier the RFC calls a UUID, and the two are interchangeable on the wire. This page mints new ones with the browser cryptographic random source, sets the version and variant bits correctly, and prints them in whichever notation you are about to paste into: hyphenated, wrapped in braces for the Windows registry and SQL Server, in parentheses, stripped of hyphens for a compact column, as a urn:uuid: string, quoted for JSON, or as a ready to compile new Guid("...") literal.
Version 4 fills 122 bits with randomness, which makes collisions vanishingly unlikely but scatters inserts across a clustered index. Version 7 puts a millisecond timestamp in the leading 48 bits, so values sort in creation order and behave far better as a primary key on a busy table while keeping the same textual shape. The uppercase switch matters more than it looks: comparisons in some databases are case sensitive on stored text, so pick one case and keep to it.
The comma option appends a separator to every line except the last, which saves editing when you are seeding an IN (...) clause or a fixture array. The nil switch prints the all zero GUID used as a null placeholder. Nothing is requested from a server, so the values are yours alone. For shorter identifiers in URLs, look at NanoID or ULID.
How to use
- Choose How many GUIDs you need.
- Pick version v4 for pure randomness or v7 when the values should sort by time.
- Select the format and case that match your target code or database.
- Copy the list, or download it as a text file.
Common questions
- What is the difference between a GUID and a UUID?
- None in practice. GUID is the Microsoft term and UUID the RFC 9562 term for the same 128 bit value, so both can be used in the same system.
- Are these GUIDs safe to use as database keys?
- Yes. Use v7 if the table is large and write heavy, because time ordered values keep index pages from fragmenting.
- Could a generated GUID clash with someone else's?
- A v4 GUID has 122 random bits, so the chance of a repeat is negligible even across billions of values.
- Why does the nil GUID exist?
- It is the reserved all zero value, used as a sentinel meaning no identifier when a column cannot be null.