# Encoding & IDs

UUID Generator & Validator

Generate UUID v1, v4, and v7 in bulk, or validate and inspect any UUID — with .NET Guid.ToString N, D, B, P and X formats.

Updated

v1 / v4 / v7 Bulk generate .NET N/D/B/P/X formats Validate & inspect

Loading UUID Generator…

What this page sends

  • Your input: Processed in this tab and not sent to a server.
  • Page load: Loading the page requests HTML, scripts and images from ByteKiln, fonts from Google Fonts, and sends Google Analytics page views, tool-usage events and catalog interactions (tool/category IDs, result status and whether a click followed search — never your input, output or search terms). Privacy & sharing

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 accepts any .NET Guid.Parse format (N, D, B, P or X) and normalises it to the 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.

Limitations

  • v4 uses crypto.randomUUID. v1's clock sequence and node ID are random rather than your MAC address, which is fine for uniqueness but not a reproduction of a specific machine's v1 IDs.
  • v7 ordering is by millisecond timestamp; several v7 UUIDs generated in the same millisecond are unique but not guaranteed to sort in creation order.
  • Name-based v3 and v5 UUIDs, v6 and v8 are not generated, though the validator reports their version.
  • The validator checks format, version and variant bits; it can't tell you whether an ID exists anywhere.
  • .NET formats follow Guid.ToString and Guid.Parse; the ToByteArray() view is the .NET byte layout, not how a database stores or sorts the value.

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 do Guid.ToString("N"), "D", "B", "P" and "X" output?

N is 32 hex digits with no hyphens; D is the default 8-4-4-4-12 form; B wraps D in braces; P wraps it in parentheses; X is a C-style hex object, {0x00112233,0x4455,0x6677,{0x88,0x99,…}}. All are lowercase in .NET. Paste a GUID in any of these forms into the Validate tab to see the other four, plus the ToByteArray() order, which reverses the first three groups.

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.

Related guides