Developer Tools
UUID Generator
Create universally unique identifiers (UUIDs, also called GUIDs) for databases, APIs and test data. Generate random version 4 or time-ordered version 7 UUIDs in bulk, format them the way you need, and check any existing UUID.
Generate UUIDs
Choose a version, how many you need and the format, then press Generate. UUIDs are created on your device with secure randomness.
Validate a UUID
How to Generate UUIDs
- Choose v4 for completely random identifiers, or v7 for identifiers that sort by creation time.
- Enter how many you need, from 1 to 1,000.
- Pick a format: uppercase, without hyphens, wrapped in braces like a Windows GUID, or quoted and comma-separated for pasting into code or SQL.
- Copy the list or download it as a text file.
Use the validator at the bottom to check whether a value is a well-formed UUID and to see its version. For version 1 and version 7 UUIDs, it also shows the creation time stored inside them.
What Is a UUID?
A UUID (universally unique identifier) is a 128-bit value written as 32 hexadecimal characters in five groups, such as 3f2b8c1e-9a4d-4e7b-b1c2-5d6e7f8a9b0c. Microsoft calls the same thing a GUID (globally unique identifier). UUIDs can be created independently on any computer without a central server, and the chance of two random UUIDs ever being the same is so small that it can be ignored in practice.
UUID v4 vs v7
| Version 4 | Version 7 | |
|---|---|---|
| Contents | 122 random bits | 48-bit Unix timestamp in milliseconds + 74 random bits |
| Sort order | Random | Sorts in the order the IDs were created |
| Reveals creation time | No | Yes, to the millisecond |
| Database primary keys | Works, but random inserts can fragment B-tree indexes | Recommended: new rows are added at the end of the index, like an auto-increment ID |
| Best for | Tokens, file names, IDs that should not reveal timing | Primary keys, event IDs, logs and anything that benefits from time ordering |
Version 7 was standardised in RFC 9562 in 2024 and is now supported by PostgreSQL 18, many ORMs and most languages' UUID libraries.
Generating UUIDs in Code
| JavaScript | crypto.randomUUID() |
|---|---|
| Python | import uuid; str(uuid.uuid4()) |
| PHP (Laravel) | Str::uuid() or Str::uuid7() |
| Java | UUID.randomUUID().toString() |
| C# / .NET | Guid.NewGuid() or Guid.CreateVersion7() |
| PostgreSQL | gen_random_uuid() or uuidv7() |
| MySQL | UUID() (version 1) |
Are These UUIDs Safe to Use?
Yes. They are generated with the Web Crypto API, the browser's cryptographically secure random number generator, and follow the RFC 9562 format with the correct version and variant bits. They are created on your device and are not sent to or stored on any server, so nobody else can see the IDs you generate.
Remember that UUIDs are identifiers, not secrets. Do not rely on an unguessable UUID alone to protect private resources; always check permissions on the server.
Frequently Asked Questions
What is the difference between a UUID and a GUID?
They are the same 128-bit identifier. GUID is Microsoft's name for it, and GUIDs are often written in uppercase inside braces, which you can choose in the format options.
Can two UUIDs ever be the same?
In theory yes, but a random v4 UUID has 122 random bits, so you would need to generate billions of UUIDs every second for many years before a collision became likely.
Should I use UUID v4 or v7?
Use v7 for database primary keys and records that benefit from being sorted by creation time. Use v4 when the ID should not reveal when it was created.
How many UUIDs can I generate at once?
Up to 1,000 per click. You can copy them all or download them as a text file.
How do I check if a UUID is valid?
Paste it into the validator below the generator. It checks the format and shows the version, variant and, for v1 and v7, the creation time.
Are the UUIDs generated on a server?
No. They are generated in your browser with secure randomness and are never transmitted or stored.