# Encoders

UUID Generator & Validator

Generate UUID v1, v4, and v7 in bulk, or validate and inspect any UUID.

v1 / v4 / v7 Bulk generate Validate & inspect Private

How the UUID Generator & Validator Works

The ByteKiln UUID Generator uses the browser's built-in crypto.randomUUID() for v4, a timestamp-based algorithm for v1 and v7, and parses the version and variant bits for validation.

Version 4 generation

Calls crypto.randomUUID() directly, which uses the browser's cryptographically secure random number generator. This is the fastest and most widely supported approach, producing truly random UUIDs.

Version 7 generation

Places the current Unix timestamp in milliseconds in the high 48 bits, the version nibble (7) in bits 48–51, and cryptographically random bytes in the remaining bits. The result sorts naturally in a database index.

Validation and inspection

The validator checks the UUID format against the standard 8-4-4-4-12 hex pattern, reads the version nibble at character 13, and reads the variant bits at character 17. For v1 and v7 UUIDs, it reconstructs and displays the embedded timestamp.

FAQ

Short answers for the things developers usually ask before trusting a tool.

What is the difference between UUID v4 and v7?

UUID v4 is fully random — 122 random bits — and has no inherent sort order. UUID v7 uses the current Unix timestamp in the high bits followed by random bits, making it sortable by creation time. v7 is the modern choice for database primary keys because it inserts in natural order, reducing B-tree fragmentation. v4 is better when you need maximum unpredictability.

Is UUID v4 truly random?

UUID v4 uses crypto.randomUUID() in modern browsers, which draws from the browser's cryptographically secure random number generator. This produces statistically unique values — the probability of two v4 UUIDs colliding is vanishingly small (~1 in 5.3×10³⁶).

What is UUID v1?

UUID v1 encodes the current time in 100-nanosecond intervals since October 15, 1582, plus a clock sequence and a node ID (typically the MAC address). This makes v1 UUIDs sortable and embeds when they were created. The trade-off is that they leak the creation time and, historically, the machine's MAC address.

How do I validate a UUID and check its version?

Switch to the Validate tab and paste any UUID. The tool checks the format, reads the version nibble (position 13 in the hex string), and reads the variant bits (position 17). For v1 and v7 UUIDs, it also extracts and displays the embedded timestamp.

What is the difference between a UUID and a GUID?

GUID (Globally Unique Identifier) is Microsoft's term for UUID. They are the same thing — a 128-bit identifier in the 8-4-4-4-12 hyphenated format. Microsoft documentation uses GUID; the internet standard (RFC 4122) uses UUID.

Related tools

Useful follow-ups when one conversion usually turns into three more.