UUID Generator
Generate v4 and v7 UUIDs ready for databases, testing, and APIs. In bulk, in the format you need.
UUID version
Generated UUID | Action | Status |
|---|---|---|
c66f1788-d0b1-4481-801c-bfce12c7cae2 | Not copied | |
ccda5596-6804-4885-9abc-1e0c8c1b9f3d | Not copied | |
d65b257d-be47-4014-a749-c098f3f509b2 | Not copied | |
4f39cca5-3e36-437f-8049-88306e0bfa26 | Not copied | |
a0d4a8bb-37c6-4671-95e9-d96e2d6a41d0 | Not copied |
How to use the UUID Generator?
Choose the version
Select v4 for a random UUID or v7 for a time-ordered UUID.
Set the quantity
Choose how many UUIDs to generate at once, up to 100.
Generate the UUIDs
Click 'Generate UUIDs' to create the identifiers instantly, right in your browser.
Copy and use
Copy any UUID with a click, use 'Copy all', or download the list as a TXT file.
UUID Generator Features
UUID v4 and v7
Switch between a fully random UUID and a time-ordered UUID, both compliant with RFC 9562.
Bulk Generation
Create 1 to 100 UUIDs at once, ready to seed test databases or mock files.
Uppercase and No Hyphens
Switch between lowercase and uppercase, and between the hyphenated format and the compact 32-character format.
One-Click Copy and Download
Copy each UUID individually, copy the whole list at once, or download everything as a TXT file.
What is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit number used to identify information without relying on a central database or a sequential counter. It's defined by RFC 9562 and written as 32 hexadecimal characters split into 5 groups, in the 8-4-4-4-12 format. The odds of two random UUIDs colliding are low enough that, in practice, each one can be treated as unique.
Structure of a UUID
A UUID has 32 hexadecimal digits arranged in 5 hyphen-separated groups, in the 8-4-4-4-12 format. The first digit of the third group marks the UUID version, and the first two bits of the fourth group mark the variant defined by RFC 9562.
For example, in 550e8400-e29b-41d4-a716-446655440000, the "4" right after the second hyphen shows it's a version 4 UUID.
Is a GUID the same as a UUID?
GUID (Globally Unique Identifier) is the name Microsoft uses for the same concept, across Windows and .NET. UUID and GUID follow the same format and serve the same purpose. The difference is just the name: outside the Microsoft ecosystem, UUID is the common term.
UUID v4 or v7: which one to use?
Both versions share the same format, but they solve different problems.
- Bit source: v4 is 122 fully random bits. v7 reserves 48 bits for a Unix millisecond timestamp and uses the rest for randomness.
- Ordering: v4 UUIDs have no relationship to each other. v7 UUIDs generated in sequence come out in increasing order, since they start with the timestamp.
- Databases: using v4 as a primary key spreads inserts across the index and fragments pages on large tables. v7 always inserts at the end of the index, like a sequential ID.
- When to use which: v4 for generic identifiers with no relation to when they were created. v7 for primary keys, logs, and anything that benefits from being sortable by date.
What devs and QAs use UUIDs for
UUIDs show up in a good part of the daily work of building and testing software:
- Primary keys in distributed databases, without relying on a central counter
- Test data and API mocks, to fill tables and payloads without colliding with real records
- Log and request correlation, tracing the same operation across several services
- Automated test fixtures, making sure every run uses fresh identifiers
Common mistakes with UUIDs
Treating the UUID as a secret
A UUID identifies a resource, it doesn't authenticate anyone. It's not a substitute for a session token or an API key.
Using v4 as a primary key on very large tables
Since v4 is fully random, every insert lands at a different point in the index. On tables with many rows, that fragments the index and hurts write performance.
Comparing UUIDs without normalizing the format
550E8400-E29B-41D4-A716-446655440000 and 550e8400-e29b-41d4-a716-446655440000 are the same UUID, but a case-sensitive string comparison treats them as different.
Generating UUIDs with Math.random()
Math.random() wasn't built to be unpredictable enough for unique identifiers. Always use a generator built on crypto.getRandomValues, like this one.
Frequently Asked Questions about the UUID Generator
Everything you need to know to generate and use UUIDs for testing and development.