UUID generator

Generate UUIDs, called GUIDs on Windows and in .NET: version 4, fully random, or version 7, which starts with the time so that new UUIDs sort after older ones, which suits database keys. Paste a UUID below to see what kind it is and when it was made.

Version 4 or 7

Version 4 has 122 random bits. Version 7 (RFC 9562) starts with the time in milliseconds, followed by 74 random bits, so UUIDs sort by when they were made.

Which one to use

Use version 7 for database primary keys: new rows land at the end of the index instead of all over it, which keeps inserts fast. Use version 4 when a UUID must not reveal when it was made.

Formats

Lower case with dashes (8-4-4-4-12 characters) is the standard form. Upper case matches what Windows and SQL Server often show, and without dashes gives a compact 32-character string. Make 1, 5, 10, 25, 100 or 1,000 at a time, one per line, to seed a database or a test.

Inspect a UUID

Paste a UUID or GUID, with or without dashes, in braces, as urn:uuid: or inside a log line, and see its version and variant. Versions 1, 6 and 7 carry the time they were made, shown in UTC and in your own time zone.

Versions 1 and 6 also carry a clock sequence and a node: the address of the network card that made it, unless its multicast bit marks it as random. Version 4 is random and records nothing, and versions 3 and 5 are hashes of a name.

Private: made on your device

Everything is generated in your browser by its cryptographic random generator (crypto.getRandomValues), the one Web Crypto uses for keys. Nothing is sent anywhere and nothing is saved: copy what you need, and generating again or leaving the page discards the rest.

Questions

What is the difference between UUID v4 and v7?

v4 is entirely random; v7 starts with a timestamp, so v7 UUIDs sort by creation time and keep database indexes compact.

Is a GUID the same as a UUID?

Yes. GUID is Microsoft's name for the same 128-bit identifier, so any UUID made here works as a GUID.

How can I tell when a UUID was made?

Paste it under Inspect a UUID. Versions 1, 6 and 7 hold a timestamp, to the millisecond or finer; a version 4 UUID holds none, so when it was made cannot be known from it.

Can two UUIDs be the same?

In practice, no: you would need to make about a billion version 4 UUIDs every second for 85 years to have even a 50% chance of one repeat.

More tools