What is the UUID Generator?
This tool generates universally unique identifiers: 128-bit values, written as 36-character strings, that can be created independently on any machine without coordination and still be effectively guaranteed not to collide.
A UUID is a 128-bit number conventionally written as 32 hexadecimal digits in five hyphen-separated groups. The point of the format is decentralised generation: any system can mint an identifier at any time without consulting a central authority, and the probability of two systems producing the same value is negligible.
Version 4 UUIDs are the common choice and are almost entirely random, 122 of the 128 bits, with the remaining six fixed to identify the version and variant. Version 1 UUIDs instead combine a timestamp with a node identifier, which makes them sortable but leaks generation time and potentially a MAC address.
The collision probability for version 4 is small in a way that is hard to convey intuitively. You would need to generate about 2.7 quintillion UUIDs before reaching even a 50% chance of a single collision. For practical purposes, uniqueness is guaranteed.
How to use the UUID Generator
- Choose a version. Version 4 for general-purpose random identifiers, version 1 when you want time-ordered values and accept the metadata they expose.
- Set how many you need. Generate a single identifier or a batch for seeding test data.
- Click Generate. Values are produced immediately in the browser.
- Copy or download. Take a single value, or download a batch as a list.
Worked examples
Anatomy of a version 4 UUID
The version digit and the variant bits are fixed; everything else is random.
f47ac10b-58cc-4372-a567-0e02b2c3d479
^ ^
| variant (8, 9, a, or b)
version (4)8-4-4-4-12 hexadecimal digits.
The 13th digit is always 4 for version 4.
The 17th digit is 8, 9, a, or b.Version 4 versus version 1
Version 1 values generated in sequence share a prefix, because they encode a timestamp. Version 4 values have no relationship to one another.
v4: 3f2a1b4c-9d8e-4f7a-b6c5-1e2d3c4b5a69
a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d
v1: 6ba7b810-9dad-11d1-80b4-00c04fd430c8
6ba7b811-9dad-11d1-80b4-00c04fd430c8v1 values sort chronologically but reveal
when and potentially where they were created.
v4 values reveal nothing.Common use cases
- Database primary keys. UUIDs let clients assign identifiers before insertion, and let records merge across databases without renumbering.
- Distributed systems. Independent services can generate identifiers without coordinating, which removes a shared bottleneck.
- Correlation and trace identifiers. Attaching a UUID to a request allows its path to be reconstructed across service logs.
- Idempotency keys. Sending a unique key with a request lets a server safely deduplicate retries.
- Test fixtures. Generating a batch gives you realistic-looking distinct identifiers for seed data.
Features and limitations
- Generates version 4 UUIDs using crypto.getRandomValues, the browser's cryptographic random source.
- Supports batch generation.
- Output uses the standard lowercase hyphenated format.
- Everything is generated client-side with no network request.
- Because version 4 values are random, using them as a clustered primary key can hurt insert performance and index locality in some databases, UUIDv7 or an ordered key is preferable there.
Frequently asked questions
Can two UUIDs ever collide?
In principle yes, in practice no. With 122 random bits, you would need roughly 2.7 quintillion values before reaching a 50% chance of one collision. It is not a risk worth engineering around.
Which version should I use?
Version 4 unless you have a specific reason otherwise. Choose version 1 or 7 when you want identifiers that sort by creation time, keeping in mind that version 1 discloses a timestamp and node identifier.
Are UUIDs safe to use as secrets?
A version 4 UUID has 122 bits of entropy, which is enough to be unguessable. Version 1 is not, because it is largely predictable from time and node. Even so, prefer a purpose-built token generator for security tokens.
Are UUIDs good primary keys?
They have real advantages, client-side generation, no cross-database collisions, no enumerable identifiers in URLs. The cost is 16 bytes instead of 4 or 8, and poor index locality for random versions, which can matter at scale.
Does case or hyphenation matter?
UUIDs are case-insensitive, and lowercase is the conventional representation. Hyphens are part of the standard string format, though some systems store the raw 16 bytes or a hyphen-free hex string.
Are these generated on a server?
No. They are generated in your browser and never transmitted, so a UUID you generate here is known only to you.
All processing happens locally in your browser, your data never leaves your device.
