UUID Generator
Generate random UUIDs
Generate random UUIDs Runs locally in your browser
About the
The UUID Generator produces version 4 universally unique identifiers using the browser's cryptographically secure random number generator, in the standard 8-4-4-4-12 form, for example 3f2504e0-4f89-41d3-9a0c-0305e82c3301. A version 4 UUID carries 122 random bits, so the chance of a collision across a few billion identifiers is far below the chance of a hardware failure in the same period. The tool generates in batches, so you can fill a fixture file or a seed table in one pass instead of clicking twenty times.
Where people use the
- Filling a fixture file or a seed script with realistic identifiers.
- Creating request IDs for an API test suite.
- Generating primary keys for rows imported from a spreadsheet.
- Producing non-guessable filenames for uploads that are not yet behind authorisation.
How to use the
- 1
Choose how many identifiers you need
Set the quantity from 1 up to a few hundred. Each one is generated independently from fresh random bytes.
- 2
Pick the format
Standard lowercase with hyphens is the default. Uppercase and hyphen-free forms are also available for systems that expect them.
- 3
Generate
Every identifier appears at once, one per line, ready to copy as a block.
- 4
Copy and paste into your data
Use the copy button to avoid trailing whitespace, then paste straight into SQL, JSON or a spreadsheet column.
Tips and best practices
- Store UUIDs in a native UUID column rather than a variable-length string type, which saves space and indexes faster.
- If you need sortable keys, generate version 7 in code instead of version 4 here.
- Never derive anything from a UUID by parsing it; the bits are random, not meaningful.
Frequently asked questions
Are these identifiers really random?
Yes. They come from crypto.getRandomValues, the platform's cryptographically secure source, not Math.random. The version and variant bits are then set as the specification requires, leaving 122 bits of randomness.
Should I use version 4 or version 7?
Version 4 if the identifier is only ever looked up by exact match. Version 7 if it is a primary key in a database, because its prefix is a timestamp, so inserts stay near the end of the index instead of scattering across it and fragmenting the B-tree.
Can I generate version 1, 3 or 5 here?
No. Version 1 needs a MAC address and clock state, and versions 3 and 5 are deterministic hashes of a namespace and a name. Those are derived values rather than random ones, so they belong in code, not in a random generator.
Is a UUID safe to expose in a URL?
It is unguessable, which is useful, but unguessable is not the same as authorised. Do not treat an unguessable identifier as an access control check; verify permissions separately.
What are the version and variant bits?
The thirteenth hex digit is fixed at 4 for version 4, and the seventeenth is limited to 8, 9, a or b for the RFC 4122 variant. That is why the pattern always looks like 8-4-4-4-12 with a 4 in the third group.
Do I need to worry about duplicates?
Not in practice. You would need to generate roughly 2.7 times ten to the eighteenth identifiers before a fifty percent chance of a single collision appears. Keep a unique constraint on the column anyway, since it costs almost nothing.