Skip to content
HandyKit

UUID Generator

Create random v4, time-ordered v7, v1 or name-based v5 UUIDs, or ULIDs, one or a thousand at a time, and inspect any UUID or ULID to see its version and creation time.

Runs in your browser. Your input is never uploaded or stored.

Random. The default choice for IDs.

From 1 to 1,000.

Format

Generated in your browser with its cryptographically secure random number generator.

Inspect a UUID

Shows the version, variant and, for time-based UUIDs, when it was created.

What is a UUID?

A UUID (universally unique identifier) is a 128-bit value used to identify something without asking a central authority for a number. Because they are practically unique, any server, device or browser can create one and be confident nobody else has the same one. UUIDs are defined in RFC 9562, which replaced RFC 4122 in 2024.

They are written as 32 hexadecimal digits in five groups:

0192f1c4-3b7a-7cc1-9d2e-5f6a7b8c9d0e
              ^    ^
              │    └ variant (8, 9, a or b for standard UUIDs)
              └ version

The first digit of the third group is the version, which says how the UUID was made. The first digit of the fourth group encodes the variant, which for every modern UUID is the RFC 9562 layout.

How to generate UUIDs

  1. Choose Version 4 for random IDs or Version 7 for IDs that sort by creation time.
  2. Set how many you need, up to 1,000.
  3. Pick a format: lowercase or uppercase, with or without hyphens or braces, as lines, a JSON array or comma-separated.
  4. Select Copy all or Download. Generate new creates a fresh batch.

UUID versions

  • Version 4 is 122 random bits plus the version and variant. It is the most widely used and reveals nothing about where or when it was made.
  • Version 7 starts with a 48-bit Unix timestamp in milliseconds, followed by random bits. IDs created later sort later, which makes v7 a good primary key.
  • Version 1 and version 6 are based on a timestamp and a node ID, historically the computer’s MAC address. Version 6 reorders version 1 so it sorts by time. Prefer v7 for new systems. This generator's v1 uses a random node ID, so it never reveals your hardware.
  • Version 3 and version 5 are derived from a namespace and a name with MD5 or SHA-1, so the same input always gives the same UUID. This tool makes v5, the recommended one: pick a namespace (DNS, URL, OID or X.500) and enter a name.
  • The nil UUID (all zeros) and max UUID (all f) are special values, often used to mean "none" or "any".

A ULID is not a UUID but serves the same purpose: 26 characters (Crockford Base32) holding a 48-bit millisecond timestamp and 80 random bits, so ULIDs sort by creation time like v7.

Paste any UUID or ULID into Inspect a UUID to see its version, variant and, for versions 1, 6 and 7 and ULIDs, when it was created.

Version 4 or version 7 for database keys?

Random v4 keys are inserted at random positions in a database index, which splits index pages, wastes cache and slows writes on large tables. v7 keys are nearly sequential, so new rows go to the end of the index, much like an auto-increment integer, while still being safe to generate anywhere.

The trade-off is privacy: a v7 UUID reveals its creation time to the millisecond. If IDs are public and creation times are sensitive, use v4.

Generating UUIDs in code

// Browsers and Node.js: version 4
crypto.randomUUID();
import uuid
uuid.uuid4()
uuid.uuid7()  # Python 3.14 and later
-- PostgreSQL
SELECT gen_random_uuid();  -- version 4
SELECT uuidv7();           -- version 7, PostgreSQL 18 and later

On the command line, uuidgen is available on macOS and most Linux systems.

Frequently asked questions

Are these UUIDs really unique?

For all practical purposes, yes. A version 4 UUID has 122 random bits, so you would need to generate about 2.7 quintillion (2.7 × 10^18) of them before there is even a 50% chance of a single duplicate. Version 7 UUIDs also include the time, which makes collisions even less likely.

Should I use version 4 or version 7?

Use v4 when you just need a unique ID. Use v7 for database primary keys: because v7 IDs start with a timestamp, new rows are inserted at the end of the index instead of at random places, which keeps B-tree indexes compact and fast. The trade-off is that a v7 ID reveals when it was created.

Are UUIDs case-sensitive?

No. The standard says to output lowercase and to accept either case, so 0192F1C4-… and 0192f1c4-… are the same UUID. Compare them case-insensitively, or normalise to lowercase first.

Can I use a UUID as a secret token?

A v4 UUID from a secure random generator is hard to guess, but UUIDs are designed as identifiers, not secrets, and v7 UUIDs are partly predictable because they contain the time. For password-reset links, API keys and session tokens, use a dedicated token generator with at least 128 random bits.

What is the difference between a UUID and a GUID?

Nothing meaningful. GUID (globally unique identifier) is Microsoft’s name for the same 128-bit format. Microsoft tools often show GUIDs in uppercase with braces, which the format options here can match.

Are the UUIDs generated on a server?

No. They are generated in your browser with crypto.getRandomValues, the same secure random source browsers use for cryptography. Nothing is sent to a server or stored, so nobody else has seen your UUIDs.

Guides