πŸ†” UUID Generator

Generate cryptographically random UUID v4 strings instantly.


How to Use This Tool

Click the refresh button to generate a new UUID v4, or choose a format (standard, raw, uppercase, GUID braces) before generating. Use Bulk Generate to create a list of multiple unique identifiers at once.

1

Select your preferred format: standard with hyphens, raw without hyphens, UPPERCASE, or {GUID} with braces.

2

Click the refresh button or any format button to generate a new UUID instantly.

3

Copy the single UUID from the output field using the clipboard button.

4

For bulk use, enter a count and click Generate, then Copy All or Download as a text file.

UUID v4 Structure and Collision Probability

A UUID v4 follows the format xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx where the 4 in the third group identifies version 4 (random), and y is restricted to 8, 9, a, or b to mark it as an RFC 4122 variant. Of the 128 bits in the full UUID, 6 are fixed for version and variant, leaving 122 bits of actual randomness. That gives approximately 5.3 Γ— 10³⁢ possible values. The probability of generating two identical UUIDs is so small it is essentially zero for any real-world application: if you generated one billion UUIDs per second continuously for 100 years, the probability of a single collision would still be less than 0.000000001%. This is why UUID v4 works as a primary key without any central coordination between systems, unlike auto-increment integers where you need a single authoritative counter. For database use, note that UUID v4 is randomly distributed so it fragments index pages in B-tree indexes. UUID v7, which is time-ordered, is better for write-heavy databases because sequential inserts go to the same index page.

Common Use Cases

Database primary keysGenerate UUIDs for distributed systems where auto-increment is not feasible
Session and token IDsCreate unique identifiers for user sessions, API tokens, or one-time links
File namingAssign UUID-based names to uploaded files to avoid collisions and path traversal
Test fixture dataBulk generate IDs for seeding a test database with unique record identifiers

Frequently Asked Questions

What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit label used to uniquely identify objects. Standard format: 8-4-4-4-12 hex characters. Also called GUID (Globally Unique Identifier) in Microsoft systems.

What is UUID v4?

UUID v4 uses random numbers. The probability of a collision is astronomically low: if you generated 1 billion UUIDs per second for 86 years, the probability of one collision would be ~50%.

What is the difference between UUID and GUID?

They are essentially the same standard. UUID is the formal RFC 4122 term; GUID is Microsoft's implementation. Both are 128-bit identifiers in the same format.

Are UUIDs good for database primary keys?

Yes, but with trade-offs. UUIDs are globally unique (no central coordination), but they are larger (16 bytes vs 4-byte int) and less efficient for indexed lookups. UUID v7 (time-ordered) is better for databases.

What is a nil UUID?

The nil UUID is all zeros: 00000000-0000-0000-0000-000000000000. Used as a null/empty UUID placeholder.