UUID Generator Online — Create Unique Identifiers v1, v4, v7

Instantly generate UUID v1, v4, and v7 using a cryptographically secure random number generator. Create from 1 to 50 identifiers at once, copy with a single click

UUID Generator
v4 RFC 9562
Version
Quantity
Case
Format
Separator
UUID v4: 128 bits · 2122 possible values · cryptographically random
Result

Click "Generate" to create UUIDs

UUID Versions
UUID v1 — Timestamp + MAC address

Generated from the current time and the network interface MAC address. Guarantees uniqueness but exposes information about the device and creation time

UUID v2 — Timestamp + MAC + domain

Extension of v1 with a DCE security domain identifier. Rarely used, primarily in DCE/RPC systems

UUID v3 — MD5 hash of namespace + name

Deterministic — the same input always produces the same UUID. Uses the MD5 hash function. Suitable for reproducible identifiers

UUID v4 — Random numbers

The most popular version. Generated entirely at random using a cryptographically secure generator. The probability of collision is 1 in 2.71 quintillion

UUID v5 — SHA-1 hash of namespace + name

Similar to v3 but uses SHA-1 instead of MD5. Recommended for new projects that require deterministic generation

UUID v7 — Unix time + random

New standard (RFC 9562). Contains a Unix timestamp at the beginning, providing natural time-based sorting. Ideal for database primary keys

UUID Structure
xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
xxxxxxxx — 32 bits

Lower 32 bits of the timestamp (time_low)

xxxx — 16 bits

Middle 16 bits of the timestamp (time_mid)

4xxx — 16 bits

Upper timestamp bits + UUID version (4 = v4)

yxxx — 16 bits

Variant (y = 8, 9, a, or b) + clock sequence

xxxxxxxxxxxx — 48 bits

Node identifier

UUID Use Cases
Databases

Primary keys instead of auto-increment. Safely merge data from different servers without ID conflicts

APIs & microservices

Request identification, tracing (trace ID), log correlation across services in distributed systems

Sessions & tokens

Session identifiers, password reset tokens, one-time action links — unpredictable and unique

File systems

Uploaded file names, temporary directories. Avoiding name conflicts during parallel uploads

Data synchronization

Offline apps create records with UUID locally — on sync the IDs remain unique without server coordination

Testing & QA

Test data generation, test run identification, test environment isolation

Frequently Asked Questions
What is a UUID and what is it used for?

UUID (Universally Unique Identifier) is a 128-bit identifier that guarantees uniqueness without central coordination. It is written as 32 hexadecimal characters separated by hyphens: 550e8400-e29b-41d4-a716-446655440000. Used in databases, APIs, and distributed systems.

Can a UUID be duplicated?

Theoretically yes, practically no. For UUID v4 the probability of collision is 1 in 2.71 × 10^18. To reach a 50% chance of collision you would need to generate 2.7 quintillion UUIDs. That is equivalent to generating 1 billion UUIDs per second for 85 years.

Which UUID version should I choose?

UUID v4 is the most popular choice for most tasks (fully random). UUID v7 is better for databases because it sorts by time. UUID v5 is for deterministic results (same input = same UUID). UUID v1 is for when time and device binding matters.

Is it safe to use UUID as a token?

UUID v4 is generated by a cryptographically secure generator and is unpredictable. However, for critical tokens (authorization, API keys) it is better to use specialized libraries for generating secrets with higher entropy.

UUID vs GUID — what is the difference?

GUID (Globally Unique Identifier) is Microsoft's term for the same format. Technically UUID and GUID are identical in structure (128 bits, 32 hex characters). GUID is more common in the .NET and Windows ecosystem, UUID everywhere else.

Does UUID affect database performance?

UUID v4 as a primary key can slow down INSERTs due to the randomness of values and B-tree index fragmentation. UUID v7 solves this with its time prefix — new records always append to the end of the index. UUID also takes 16 bytes versus 4–8 bytes for INT/BIGINT.

How is UUID stored in a database?

Optimally as BINARY(16), which takes 16 bytes. VARCHAR(36) stores the text representation and takes 36 bytes. PostgreSQL has a native UUID type. MySQL 8.0+ supports UUID_TO_BIN() and BIN_TO_UUID() for efficient conversion.

Can you decode a UUID and find out when it was created?

It depends on the version. UUID v1 and v7 contain a timestamp — the creation time can be extracted. UUID v4 is fully random — no information other than the version (4) and variant can be extracted. UUID v3/v5 cannot be decoded without knowing the input data.

What Is UUID and How It Works

UUID (Universally Unique Identifier) is a standardized 128-bit identifier format defined in RFC 9562 (formerly RFC 4122). The core idea is the ability to generate unique identifiers on any device, at any time, without needing to verify uniqueness through a central server.

Format

A UUID is written as 32 hexadecimal characters separated by four hyphens into five groups: 8-4-4-4-12. For example: 550e8400-e29b-41d4-a716-446655440000. The character at position 13 indicates the version (1–7), and the first character of the fourth group defines the variant (8, 9, a, or b for a standard UUID).

Why UUID v4 Is the Most Popular

UUID v4 uses a cryptographically secure pseudorandom number generator (CSPRNG). Of 128 bits, 6 are reserved for version and variant, leaving 122 bits of entropy. This yields 5.3 × 10^36 possible combinations. UUID v4 is not tied to time or hardware, ensuring complete anonymity of generation.

UUID in Databases

Using UUID as a primary key has advantages: safe data merging from different sources, the ability to generate IDs on the client without a database round-trip, and no information leak about record creation order. Downsides include larger size (16 bytes versus 4–8 for INT) and index fragmentation for v4. UUID v7 solves the fragmentation issue with its time prefix.

UUID v7 — The New Standard

UUID v7, standardized in RFC 9562 (2024), combines the advantages of UUID v1 (time-based sorting) and v4 (randomness). The first 48 bits are a Unix timestamp in milliseconds, the rest are random. This makes v7 ideal for database primary keys where insert order matters.

Related calculators

Disclaimer: all calculations on this site are approximate and provided for informational purposes. Results may differ from actual depending on individual conditions, technical specifications, region, legislative changes, etc.

Financial, medical, construction, utility, automotive, mathematical, educational and IT calculators are not professional advice and cannot be the sole basis for making important decisions. For accurate calculations and advice, we recommend consulting with specialized professionals.

The site administration bears no responsibility for possible errors or damages related to the use of calculation results.