ruxox
Start
Start
UUID / IDs

UUID Generator

Generate RFC 4122 UUID v4 identifiers instantly in your browser. Generate one or a batch of UUIDs. Uses crypto.randomUUID() — no server, no tracking.

UUID Generator

Runs entirely in your browser — no server calls, no tracking.

Click Generate UUIDs to begin.

🔒 Your data never leaves this tab. This tool has no backend.

About this tool

About the UUID Generator

A UUID (Universally Unique Identifier) is a 128-bit identifier standardised in RFC 4122 that is statistically guaranteed to be unique without any central coordination. UUID v4 uses cryptographically random bits — this tool calls crypto.randomUUID(), which uses the browser's cryptographically secure pseudo-random number generator (CSPRNG). The probability of generating a duplicate across all UUID v4 values ever created is astronomically small.

Where UUIDs are used

UUIDs are primary keys in databases where you cannot predict the next ID (distributed systems, multi-region writes, client-side insert before server confirmation). They are used as session tokens, request trace IDs, file upload identifiers, API key prefixes, and unique identifiers for objects in event logs. Because they are generated without a server call, clients can assign IDs locally and sync to the server later.

UUID v4 vs other versions

UUID v1 encodes the current timestamp and MAC address — identifies when and where it was created but leaks machine information. UUID v3 and v5 are name-based (deterministic hashes of a name + namespace) — use these when you need the same input to always produce the same UUID. UUID v4 is fully random — use it when uniqueness is the only requirement. UUID v7 (emerging) is time-ordered random, suitable for database primary keys because it produces sequential values that index efficiently.

UUID versions

UUID, GUID, and which version to generate

A UUID is a 128-bit identifier written as 36 characters — 32 hexadecimal digits in five hyphenated groups. GUID (Globally Unique Identifier) is Microsoft's name for exactly the same thing, so a UUID generator and a GUID generator are interchangeable.

VersionBuilt fromUse it when
v4Random dataDefault choice for almost everything
v7Timestamp + randomDatabase keys — sorts by creation time
v1Timestamp + MAC addressLegacy; leaks the generating machine
v5SHA-1 of a namespace + nameSame input must always give the same ID

Will two v4 UUIDs ever collide?

In practice, no. A v4 UUID has 122 random bits, giving about 5.3 × 1036 possible values. You would need to generate roughly a billion per second for around 85 years before a single collision became likely. Application-level collision handling is not something you need to write.

UUIDs as database primary keys

The traditional objection is that random v4 values scatter inserts across a B-tree index, hurting write performance and cache locality on large tables. Version 7 fixes this by putting a timestamp in the high bits, so new IDs sort roughly in creation order while staying unique — you get the distributed-generation benefit without the index fragmentation.

Format variations

The canonical form is lower case with hyphens. Some systems want it upper case, some strip the hyphens to a 32-character string, and SQL Server wraps it in braces. These are all the same identifier in different clothing — compare them case-insensitively and normalise before storing.

FAQ

Frequently asked questions

What is the difference between a UUID and a GUID?

Nothing functional. GUID (Globally Unique Identifier) is Microsoft's name for the same 128-bit value that the rest of the world calls a UUID. Both are 36 characters — 32 hexadecimal digits in five hyphenated groups — and a generator for one produces valid output for the other.

Which UUID version should I use?

Version 4 for almost everything: it is purely random with no information leakage. Use version 7 for database primary keys, since its timestamp prefix keeps inserts in roughly sequential order and avoids index fragmentation. Avoid version 1, which embeds the generating machine's MAC address.

Can two UUIDs ever be the same?

Effectively never. A version 4 UUID has 122 random bits, or about 5.3 × 10^36 possible values. Generating a billion per second, you would wait roughly 85 years before a collision became likely. You do not need application-level collision handling.

Are UUIDs a good primary key?

Version 7 UUIDs are, and version 4 can be with care. The classic problem is that random v4 values scatter writes across the index, which slows inserts on large tables. Version 7 puts a timestamp in the high bits so new keys sort in creation order, keeping the benefits without the fragmentation.

Are these UUIDs generated securely?

Yes. They are produced in your browser using the built-in cryptographic random source, and nothing is sent to or stored on a server. The page works offline.

Is it possible for two UUID v4 values to be the same?
Theoretically yes, practically no. UUID v4 has 122 random bits, giving approximately 5.3 × 10³⁶ unique values. Generating 1 billion UUIDs per second for 85 years would give roughly a 50% chance of a single collision. For any real application, assume UUIDs are unique.
Should I use UUIDs or auto-incrementing integers as database primary keys?
It depends. Auto-increment integers are smaller (4–8 bytes vs 16 bytes), sequentially indexed (faster for B-tree inserts), and human-readable. UUIDs are better for distributed systems, client-generated IDs, and preventing ID enumeration attacks. UUID v7 (time-ordered) partially addresses the index fragmentation problem of random UUIDs.
What is the format of a UUID?
A UUID is written as 32 hexadecimal digits in 5 groups separated by hyphens: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx. The "4" at position 13 indicates version 4. The "y" at position 17 is one of 8, 9, a, or b (indicating variant 2, which is RFC 4122). Total: 36 characters including hyphens.
Can I use the UUIDs I generate here in production?
Yes — they are generated using crypto.randomUUID(), the same browser API that production applications use client-side. The values are as cryptographically random as anything generated server-side with Node's crypto.randomUUID() or Python's uuid.uuid4().
Custom software

Need a distributed system or custom API built?

ruxox builds production web apps and APIs for growing businesses. Free scoping estimate in 48 hours.

Free project estimateNo obligation · reply in 48h
Get estimate