What Is a UUID and When Do You Need One?
Updated October 2026
Written by the Toolpuffin team. Tools in this guide are tested in the browser.
A UUID is a long, random-looking identifier such as 3f2b8c1e-9a4d-4e7b-8c2f-1d5a6b7c8d9e. Developers use them to label users, orders, files and records without a central counter handing out numbers. This guide explains what is inside one, which version to pick and what a UUID is not for.
Generate a UUID in three steps
- Open the UUID Generator.
- Choose how many you need and click Generate.
- Copy the result, with uppercase or no hyphens if your system wants that.
What a UUID looks like
A UUID is a 128-bit value, written as 32 hexadecimal digits in five groups separated by hyphens: 8-4-4-4-12. The same identifier is called a GUID in Microsoft software.
In a version 4 UUID, the first digit of the third group is always 4, and the first digit of the fourth group is 8, 9, a or b. That is how you can recognise one.
Which version should you use?
- Version 4 is random. It is the most common choice and the one the generator makes. It has 122 random bits, because 6 bits are fixed to mark the version and variant.
- Version 1 is built from a timestamp and a machine identifier, so it can reveal when and where it was made.
- Version 7 starts with a timestamp and ends with random bits, so new values sort roughly in the order they were created. It was added to the UUID standard in 2024.
- The nil UUID is all zeros and is used as an empty value.
Can two UUIDs be the same?
In theory yes, in practice no. With 122 random bits there are about 5.3 times 10 to the power 36 possible version 4 values. You would have to create roughly 2.7 times 10 to the power 18 UUIDs before the chance of any repeat reaches 50 percent. That is more than a billion UUIDs per second for about 85 years.
When a UUID is a good idea
- Records created on several machines or offline, which cannot share one counter.
- Public identifiers that should not reveal how many records exist, unlike 1, 2, 3.
- File names or keys that must not clash when you merge data from different sources.
When it is not
- A UUID is an identifier, not a secret. Do not use it as a password or as the only protection of a private link.
- Random UUIDs as database keys can slow down large indexes, because new values land all over the index. Time-ordered versions such as version 7 reduce that.
- A UUID is long and hard to read aloud. For short codes people type, use something shorter.
Privacy
The UUIDs are created in your browser, with the secure random source of your device. Nothing is sent anywhere.