What is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit label used to identify information in computer systems without a central authority handing out numbers. Its standard text form is 32 hexadecimal characters grouped as 8-4-4-4-12 and separated by hyphens — for example 550e8400-e29b-41d4-a716-446655440000. The format is defined by RFC 4122, which was superseded in 2024 by RFC 9562.
Because the chance of two independently generated UUIDs colliding is astronomically small, they are the default choice for database primary keys, request and transaction IDs, distributed systems, and any place where two systems must invent identifiers that never clash.
Terminology: Microsoft calls the same structure a GUID. UUID and GUID are interchangeable — GUID simply uses a slightly different variant field.
Anatomy of a UUID
Read left to right, every UUID carries its own metadata. The third group starts with the version digit, and the fourth group encodes the variant:
- 32 bits
time_lowin v1 · random in v4 - 16 bits
time_midin v1 · random in v4 - 16 bits version nibble comes first — here
4 - 16 bits variant bits come first —
8,9,aorb - 48 bits node in v1 · random tail in v4
UUID versions
Each version is built from different inputs. Pick the one that matches how the identifier will be used:
Random
122 bits from a cryptographically secure random source. The default for general-purpose unique IDs; it reveals nothing about the device or the creation time.
Time-ordered
A 48-bit Unix millisecond timestamp followed by random bits. Sorts chronologically and indexes efficiently in B-tree databases — the modern replacement for v1.
Time + node
Gregorian timestamp plus a clock sequence and node identifier. Sortable by time, but it can disclose when and (traditionally) where the value was created.
Name-based (SHA-1)
SHA-1 hash of a namespace UUID concatenated with a name. Deterministic, and preferred over v3 for new name-based identifiers.
Name-based (MD5)
MD5 hash of a namespace plus a name. Kept for compatibility with existing systems; MD5 is no longer considered collision resistant.
Which version should I use?
In practice the choice comes down to one question: do you need the identifier to be random, sortable by time, or derived from a name?
| Version | How it is built | Sortable by time | Typical use |
|---|---|---|---|
v4 |
122 random bits | No | The safe default for unique IDs |
v7 |
48-bit Unix timestamp + 74 random bits | Yes | Primary keys, event logs, anything sorted by time |
v1 |
60-bit timestamp + clock sequence + node | Yes | Legacy systems and request tracing |
v5 |
SHA-1 of namespace + name | No | Stable IDs derived from a domain, URL or path |
v3 |
MD5 of namespace + name | No | Existing v3-based systems |
How to use this generator
- Choose a version in the dropdown. v4 is the safe default, v7 is the best pick for database keys.
- For v3 or v5, enter a namespace and a name — for example the DNS namespace with
example.com. - Set how many UUIDs you need (1–1000) and toggle the formatting options: uppercase, hyphens, braces.
- Click Generate UUID. Copy a single value with the row button, take everything with Copy all, or export the batch as .txt / .csv.
The generator remembers your settings in this browser, so the tool opens with the same configuration next time.
Generate UUIDs in your code
You usually do not need a library — modern platforms ship UUID support in their standard library.
// Browser — built into the Web Crypto API (v4)
const id = crypto.randomUUID();
// Node.js 16+
const { randomUUID } = require("node:crypto");
console.log(randomUUID());
import uuid
print(uuid.uuid4()) # random
print(uuid.uuid1()) # time + node
print(uuid.uuid5(uuid.NAMESPACE_DNS, "example.com")) # name-based
uuidgen # Linux / macOS
node -e "console.log(crypto.randomUUID())"
python -c "import uuid; print(uuid.uuid4())"
Databases can produce them too: PostgreSQL 13+ has gen_random_uuid(), MySQL has UUID(), SQL Server has NEWID() and Oracle has SYS_GUID().
Where UUIDs are used
- Database keys — unique rows that can be generated by any client without a round trip to the server.
- APIs and microservices — correlation and request IDs that follow a call across service boundaries.
- Distributed systems — no coordinator needed, so IDs can be minted offline or on the edge.
- File and object names — collision-free names for uploads, exports and caches.
- Test data — realistic, unique fixtures for development and QA.
- Idempotency keys — let a payment or job run be retried without duplicating work.
Is this tool private and safe?
Yes. Every value on this page is produced on your device by the browser's cryptographically secure random number generator — there is no server-side component and no upload. This makes the generator suitable for prototyping, local development, documentation and generating non-sensitive identifiers.
Do not use a publicly generated UUID as a secret. UUIDs are identifiers, not passwords or API keys — they are not designed to be unguessable. Generate secrets with a dedicated cryptographic random generator instead.
Frequently asked questions
Will two UUIDs ever collide?
For v4 the 122 random bits make an accidental collision effectively impossible at any realistic scale — you would need to generate around 2.7 × 1018 values before a 50% chance of one collision. v1 and v7 are scoped by time and node, and v3/v5 are deterministic per input, so different inputs never produce the same UUID.
Which UUID version should I use?
Use v4 for most random identifiers. Use v7 when the values will be stored in a database that indexes them, because the leading timestamp keeps inserts sequential and the index compact. Use v3 or v5 when the same input must always map to the same UUID, for example stable identifiers derived from a domain name.
Is this generator free, and is there a limit?
It is free with no account and no daily quota. You can generate up to 1000 UUIDs per click; the interface lists the first 500 for readability, while copy and download always include the full batch.
Are UUIDs case sensitive?
No. The hexadecimal digits are conventionally lowercase, but tools parse uppercase and lowercase identically. This generator lets you pick the casing you need.
Do I need to install anything?
No. This is a static page that works in any modern browser, offline included once it is loaded — no app, no account, no dependencies.
Can I use these UUIDs commercially?
Yes. Identifiers generated here are not copyrighted or licensed in any way, and the tool is free for personal and commercial work. See the disclaimer in the footer about guarantees of uniqueness.