UUID Generator
Free UUID generator: create random version 4 or time-ordered version 7 UUIDs in bulk, format them for code or SQL, and validate or decode any UUID you paste.
Paste one or more UUIDs, one per line. Braces, quotes, urn:uuid: and missing hyphens are accepted.
| UUID | Status | Version | Variant | Timestamp (UTC) |
|---|
Generate UUIDs Online, Single or in Bulk
A UUID (universally unique identifier, also called a GUID) is a 128-bit ID that you can create anywhere without asking a central server. This UUID generator makes up to 1000 of them at once, as random version 4 IDs or as version 7 IDs that sort by creation time.
Format the list for your use case: uppercase, without hyphens, wrapped in braces or quoted with commas for arrays and SQL. Paste existing IDs into the validator to see their version, variant and, for time-based UUIDs, the moment they were created. The random numbers come from your browser’s secure crypto API.
How to generate UUIDs
- Pick a version: version 4 for general random IDs, version 7 for database keys that should sort by time.
- Enter how many you need, from 1 to 1000, and click Generate.
- Choose the format: uppercase, no hyphens, braces or quotes with commas. The list updates instantly.
- Copy or download the list as a text file.
- To check an ID, paste it into the validator below the generator.
How a UUID is structured
A UUID is 32 hexadecimal digits shown in five groups, 8-4-4-4-12, for 36 characters including hyphens. The first digit of the third group is the version, and the first digit of the fourth group holds the variant: 8, 9, a or b for standard UUIDs.
Version 4 fills the other 122 bits with random data. Version 7, defined in RFC 9562 (2024), starts with a 48-bit Unix timestamp in milliseconds, followed by the version, 12 bits of random data (used here as a counter so IDs from the same millisecond stay in order), the variant and 62 more random bits. Because the time comes first, version 7 IDs sort in creation order as text and as bytes.
Example version 7 layout: 0190d3a2-7b1c-7e4f-9a2d-3c5b8e1f6a70, where 0190d3a27b1c is the timestamp, the 7 after the second hyphen is the version and the 9 after the third hyphen marks the standard variant.
UUID versions compared
| Version | Based on | Typical use |
|---|---|---|
| 1 | Timestamp (100 ns since 1582) and node ID, often the MAC address | Legacy systems; reveals time and machine |
| 3 / 5 | MD5 / SHA-1 hash of a namespace and a name | The same input always gives the same ID |
| 4 | 122 random bits | General-purpose IDs, tokens, file names |
| 6 | Version 1 fields reordered so they sort by time | Upgrading version 1 systems |
| 7 | 48-bit Unix milliseconds plus 74 random bits | Database primary keys, event and log IDs |
| 8 | Vendor-defined layout | Custom or experimental formats |
| Nil / Max | All zeros / all ones | Placeholders and sentinel values |
Choosing and storing UUIDs
- Use version 7 for primary keys. Random version 4 keys land all over a B-tree index, while time-ordered keys are appended near the end, which keeps inserts fast and indexes compact.
- Remember that version 7 shows when a record was created. Use version 4 for public IDs where that time should stay private.
- Store UUIDs as 16 bytes, for example the
uuidtype in PostgreSQL orBINARY(16)in MySQL, instead of a 36-character string. - Do not use UUIDs as passwords. They are unique, not secret. For security tokens, use a dedicated random generator with enough entropy.
- In code, most platforms create them natively:
crypto.randomUUID()in JavaScript,uuid.uuid4()in Python,Str::uuid()andStr::uuid7()in Laravel.
Working on a project setup? The gitignore generator and the htaccess generator cover two more files every repository needs.
Frequently Asked Questions
Common questions about UUIDs and GUIDs.
A UUID is a 128-bit identifier written as 36 characters, such as 3f2b8c1e-4a7d-4f6e-9b21-7c8d5e4f3a10. It is designed to be unique without coordination, so different computers can create IDs independently.
Yes. GUID is the name Microsoft uses for the same 128-bit format. Windows tools often show GUIDs in uppercase and wrapped in braces, which you can switch on above.
In theory yes, in practice no. With 122 random bits, you would need about 2.7 quintillion version 4 UUIDs for a 50% chance of a single duplicate, which is roughly a billion IDs per second for 86 years.
Use version 7 for database keys and anything that benefits from sorting by time. Use version 4 when the ID must not reveal when it was created.
They use crypto.getRandomValues or crypto.randomUUID, the cryptographically secure random number generator of your browser. Nothing is sent to a server.
Paste it into the validator. For version 7 it reads the first 48 bits as Unix milliseconds; for versions 1 and 6 it converts the 60-bit count of 100-nanosecond intervals since 15 October 1582 to a UTC date.
The first digit of the fourth group tells which layout the UUID follows. 8, 9, a and b mean the standard RFC 9562 layout; other values are reserved for old NCS and Microsoft formats or future use.
It has 32 hexadecimal characters. With the four hyphens it is 36 characters long, and with braces 38.