How UUID Generator works
This tool produces 1 to 50 version 4 UUIDs per click in the standard 8-4-4-4-12 layout, for example f47d851c-fd7f-4efa-874c-dacca7153c14. You can switch the output to uppercase and remove the hyphens to get a bare 32-character hex string. Every value has the version digit 4 and a variant digit of 8, 9, a or b in the right places, so it passes UUID validation. One limit to know before you use them: the values come from a general-purpose pseudo-random generator, not a cryptographic one. They are well suited to sample data, test fixtures and placeholder IDs. For identifiers in a production system, generate UUIDs in your own code with the functions listed below.
Example output in each format
Real output from the tool. A new batch is produced each time you press Generate.
Default: lowercase with hyphens
How many: 3, Uppercase unticked, Include hyphens ticked
f47d851c-fd7f-4efa-874c-dacca7153c14, 1ae530ac-09be-409e-ad74-48b41d6e202c, 6b615ffc-4092-482d-b3c4-cf2df809ba9f
Length 36 chars. The third group of each starts with 4; the fourth groups start with 8, a and b.
Uppercase, GUID style
How many: 2, Uppercase ticked, Include hyphens ticked
F47D851C-FD7F-4EFA-874C-DACCA7153C14, 1AE530AC-09BE-409E-AD74-48B41D6E202C
Without hyphens
How many: 2, Uppercase unticked, Include hyphens unticked
f47d851cfd7f4efa874cdacca7153c14, 1ae530ac09be409ead7448b41d6e202c
Length 32 chars. The version digit is now the 13th character and the variant digit the 17th.
Uppercase without hyphens
How many: 1, Uppercase ticked, Include hyphens unticked
F47D851CFD7F4EFA874CDACCA7153C14
UUID v4 format, group by group
Using f47d851c-fd7f-4efa-874c-dacca7153c14 as the example.
| Group | Example | Hex digits | Contents |
|---|---|---|---|
| 1 | f47d851c | 8 | 32 random bits |
| 2 | fd7f | 4 | 16 random bits |
| 3 | 4efa | 4 | Version digit 4, then 12 random bits |
| 4 | 874c | 4 | Variant digit (8, 9, a or b, carrying 2 random bits), then 12 random bits |
| 5 | dacca7153c14 | 12 | 48 random bits |
32 + 16 + 12 + 14 + 48 = 122 random bits. The other 6 bits are the fixed version (4 bits) and variant (2 bits).
How to generate a version 4 UUID in code
For real identifiers, use the built-in function for your platform. Each of these returns a version 4 UUID by default.
| Language or tool | Call |
|---|---|
| JavaScript (browsers, Node.js) | crypto.randomUUID() |
| Python | import uuid; uuid.uuid4() |
| Java | java.util.UUID.randomUUID() |
| C# / .NET | Guid.NewGuid() |
| PostgreSQL 13 and later | SELECT gen_random_uuid(); |
| Ruby | require 'securerandom'; SecureRandom.uuid |
| Linux or macOS shell | uuidgen |
| PowerShell | [guid]::NewGuid() |
In browsers crypto.randomUUID() is available on secure (HTTPS) pages only.
UUID versions compared
| Version | Built from | Sortable by time | Typical use |
|---|---|---|---|
| v1 | Timestamp plus a node ID, traditionally the MAC address | Not as text | Legacy systems; can reveal when and where it was made |
| v3 | MD5 hash of a namespace and a name | No | Same input always gives the same UUID |
| v4 | 122 random bits | No | General-purpose IDs with no embedded information |
| v5 | SHA-1 hash of a namespace and a name | No | Repeatable IDs derived from names; preferred over v3 |
| v6 | v1 timestamp with the fields reordered | Yes | Drop-in sortable replacement where v1 is already used |
| v7 | 48-bit Unix millisecond timestamp, then random bits | Yes | Database primary keys that should insert in order |
| v8 | Custom, application-defined layout | Depends | Experimental or vendor-specific schemes |
Versions 6, 7 and 8 were standardised in RFC 9562 (2024), which replaced RFC 4122. This tool generates v4 only.
What these generated UUIDs are suitable for
The About panel under the results reports 122 random bits because that is how many bits a version 4 UUID has room for. How unpredictable a particular UUID is depends on the generator behind it. Here, each press of Generate starts a small pseudo-random generator from a seed between 0 and 999,999 and fills in the hex digits from it. The results are valid and look fully random, but there are only a million possible batches, and anyone who knows the method could reproduce them.
That makes the tool a good fit for work where the UUID only needs to be well formed: seed rows in a development database, IDs in API documentation and Postman examples, unit-test fixtures, mock JSON, spreadsheet rows that need a stand-in key, and trying out a validation rule or a column type. It is the wrong source for record IDs in a live system, and for anything that works as a secret, such as password-reset links, share URLs or session identifiers. Those should come from a cryptographically secure generator, and secret tokens are usually better as dedicated random strings than as UUIDs.
Regex to validate a version 4 UUID
^[0-9a-f]{8}-[0-9a-f]{4}-4[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$
Apply it case-insensitively so that uppercase values match too. The literal 4 checks the version digit and [89ab] checks the variant digit. To accept any UUID version, replace the 4 with [0-9a-f]. For the hyphen-free form, remove the four hyphens from the pattern. Every value this tool outputs with hyphens matches the pattern as written.
How to get your result
- 1
Leave Version on Version 4 (random). It is the only version this tool makes.
- 2
Enter How many UUIDs you need, from 1 to 50.
- 3
Tick Uppercase if your system stores them in capitals, as GUIDs often are on Windows.
- 4
Untick Include hyphens to get the compact 32-character form.
- 5
Press Generate, then copy individual values or download the list as uuids.txt. Press Generate again for a new batch.