Generate random version-4 UUIDs (GUIDs).
Generated locally with a secure random generator.
What is a version-4 UUID and how is it generated?
A version-4 UUID (GUID) is a random identifier made of 122 random bits formatted as 8-4-4-4-12 hex digits, with version and variant bits fixed per the standard. A generated UUID looks like 3f2504e0-4f89-41d3-9a0c-0305e82c3301. The chance of a collision between random v4 UUIDs is astronomically small, so they are safe as unique identifiers for databases, APIs and testing.
Understanding your result
The chance of a collision between random v4 UUIDs is astronomically small, so they are safe as unique identifiers.
Formula and method
Version-4 UUIDs are 122 random bits formatted as 8-4-4-4-12 hex digits, with the version and variant bits fixed per the standard.
Assumptions and limitations
Version-4 UUIDs are random, so they carry no timestamp and do not sort in creation order — unlike time-based UUID variants. They are 122 bits of randomness, not a guarantee of uniqueness, though collisions are effectively impossible in practice. This tool generates v4 only, not other versions.
Worked example
A generated UUID looks like 3f2504e0-4f89-41d3-9a0c-0305e82c3301.
How to use this tool
- Choose how many to generate.
- Press Generate, then copy the list.
Common mistakes to avoid
- Relying on UUIDs for ordering — they are not sequential.
About the UUID Generator
Generate random version-4 UUIDs (also called GUIDs) for databases, APIs and testing.
Who should use this tool
Developers seeding databases with unique primary keys, API designers who need request or entity identifiers, and testers generating throwaway IDs for fixtures. Anyone who wants a globally unique reference without coordinating a central counter will find version-4 UUIDs a fast, dependency-free choice.
Benefits
- Produces standards-compliant identifiers in the 8-4-4-4-12 hexadecimal format
- Randomness makes accidental collisions effectively impossible
- Needs no central server or coordination to stay unique
- Generated entirely in your browser, never logged elsewhere
Practical use cases
- Assigning a primary key when inserting a database row
- Creating a correlation ID for tracing API requests
- Generating unique fixture IDs for automated tests
- Naming uploaded files to avoid collisions
Explore all Developer Tools tools
Frequently asked questions
Are these cryptographically random?
Yes. They use the browser’s secure random generator where available.
Can two version-4 UUIDs ever be the same?
In theory yes, but the probability is astronomically small. A v4 UUID has 122 random bits, giving over 5 undecillion possibilities. You would need to generate billions of UUIDs per second for many years before a duplicate became remotely likely, so they are treated as unique in practice.
Do version-4 UUIDs sort in the order they were created?
No. Version-4 UUIDs are fully random and contain no timestamp, so sorting them yields no chronological meaning. If you need identifiers that sort by creation time, you need a time-ordered variant instead. Use v4 when order does not matter and pure uniqueness is the goal.