Free GUID and UUID generator

What is a GUID?
A GUID is a 128-bit identifier. Microsoft popularized the name; the same value is a UUID. This page creates version 4. Of the 128 bits, 122 are random, and the rest are fixed so the value announces its version and the standard variant. Written with hyphens, it is 36 hexadecimal characters, in the shape 8-4-4-4-12.
Why is a GUID unique?
It is unique because those 122 bits come from the browser's cryptographic random source, not from a counter. There are 2^122 possible values, about 5.3 × 10^36. Any computer can mint one on its own, with no shared database and no check against a registry. Two independent values matching is so unlikely that the id is treated as unique in ordinary use.
Why use a GUID instead of an autoincrementing id?
An autoincrementing id only exists if one database hands out the next number. A GUID can be created before the record is saved, offline, or on many servers at once, and those records can later be merged without renumbering. A sequential number also leaks information: 10042 says there are at least that many rows, and the neighboring ids are easy to guess. A version 4 GUID does neither. It is not a password — anyone who is shown the value can reuse it — and it takes more space than an integer. Because the bits are random, it does not sort by time. When a database key should stay in creation order, use UUID version 7. This GUID is created in this browser and is not sent anywhere.

