🆔

UUID Generator

Generate UUID v1, v4, v5, or Nil identifiers in bulk. Validate any UUID and detect its version. Copy instantly — no signup required.

UUID Version

Randomly generated using a cryptographically secure random number generator. The most widely used UUID type — suitable for any general-purpose unique identifier.

Options

1100

Letter Case

Results

🆔

Choose a version and click
Generate

Explore This Tool in Context

UUID Generator is part of the Developer collection. If you want a broader view of similar workflows, open the Developer category page or browse all QuickTools categories.

Common next steps after this tool include JSON Formatter, QR Code Generator and Base64 Encoder / Decoder.

What Is a UUID Generator?

A UUID (Universally Unique Identifier), also known as a GUID (Globally Unique Identifier), is a 128-bit label defined by RFC 4122. It is represented as 32 hexadecimal digits grouped in the pattern xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx — for example, 550e8400-e29b-41d4-a716-446655440000.

UUIDs are the industry-standard way to generate unique identifiers without a central authority. They are used everywhere: primary keys in databases, session tokens, transaction IDs, file names, API keys, distributed system correlation IDs, and anywhere an identifier must be unique across multiple machines or services without coordination.

This tool supports four UUID types: v1 (time + MAC address), v4 (pure random), v5 (name-based, deterministic), and the special Nil UUID. You can generate up to 100 at once, toggle uppercase/lowercase, and download the full list as a .txt file. The built-in validator checks any UUID for RFC 4122 compliance and identifies its version.

How to Use the UUID Generator

  1. Choose UUID version — Select v4 for general-purpose random IDs, v1 for time-ordered IDs, v5 for deterministic name-based IDs, or Nil for the sentinel zero-UUID.
  2. Set the count — Drag the slider or type a number (1–100) to generate multiple UUIDs at once. Nil always returns one ID.
  3. For v5 — enter namespace and name — Choose a standard namespace (URL, DNS, OID, X.500) and type a name. The same inputs always produce the same UUID.
  4. Choose letter case — Toggle between lowercase (550e8400…) and uppercase (550E8400…) to match your codebase convention.
  5. Click Generate — Results appear instantly in the panel. Click the copy icon on any row to copy a single UUID, or use Copy All to get all of them at once.
  6. Download .txt — Click “Download .txt” to save the full list, one UUID per line, for use in scripts, seed files, or test fixtures.
  7. Validate — Switch to the Validate tab, paste any UUID string, and click Validate to confirm RFC 4122 compliance and see the detected version number.

UUID Versions Compared

VersionAlgorithmDeterministic?Best For
v1Timestamp + MAC addressNo (time-varying)Time-ordered DB records, event logs, auditing
v4Cryptographic randomNo (random)General-purpose keys, session tokens, primary keys
v5SHA-1(namespace + name)YesStable IDs for known entities (URLs, users, products)
NilAll zerosYes (always same)Sentinel / null / default UUID value

Real-World UUID Examples

Database primary key

v4
INSERT INTO orders (id) VALUES ('550e8400-e29b-41d4-a716-446655440000')

REST API resource identifier

v4
GET /api/users/f47ac10b-58cc-4372-a567-0e02b2c3d479

Deterministic product ID

v5
uuid.v5('https://shop.com/product/123', namespace.URL)

Correlation ID in logs

v4
{ "correlationId": "1b9d6bcd-bbfd-4b2d-9b5d-ab8dfbbd4bed" }

Time-ordered event ID

v1
INSERT INTO events (id, ts) VALUES (uuid_generate_v1(), NOW())

Null / absent UUID sentinel

Nil
if (user.avatarId === '00000000-0000-0000-0000-000000000000') …

How UUID Generation Works

All UUIDs share the same 128-bit / 32-hex-character structure: time_low – time_mid – time_hi_and_version – clock_seq – node. The variant bits at position 8 and the version nibble at position 13 distinguish one type from another.

  • v1 — Time-based: the first three groups encode a 60-bit UTC timestamp with 100-nanosecond resolution; the last group encodes the MAC address (or a random node if not available). Because the timestamp increases monotonically, v1 UUIDs sort chronologically.
  • v4 — Random: 122 bits are filled with cryptographically secure random data (crypto.randomBytes in Node.js). The version nibble is set to 4 and two variant bits are set to 10 per RFC 4122. The probability of collision is astronomically low — approximately 1 in 5.3×1036.
  • v5 — Name-based (SHA-1): a SHA-1 hash is computed over the concatenation of the namespace UUID bytes and the name bytes. The top 122 bits of the hash become the UUID. The same namespace + name input always produces the same output, making v5 ideal for stable, reproducible IDs.
  • Nil — Special case: all 128 bits are zero. Defined in RFC 4122 as a special-form UUID representing absence or default.

Frequently Asked Questions

What is the difference between a UUID and a GUID?

They are the same concept. GUID (Globally Unique Identifier) is Microsoft’s name for UUID (Universally Unique Identifier). Both refer to the RFC 4122 128-bit identifier format. Microsoft GUIDs follow the same structure and are fully interchangeable with standard UUIDs.

Can two v4 UUIDs ever be the same?

Theoretically yes, but practically no. A UUID v4 has 122 random bits, giving 2¹²² ≈ 5.3×10³⁶ possible values. To have a 50% chance of a collision you would need to generate approximately 2.7×10¹⁸ UUIDs. For any real application the risk is safely negligible, which is why UUID v4 is used as a primary key in databases serving billions of records.

Should I use UUID v1 or v4 for database primary keys?

v4 is the safe default. v1 leaks the generating machine’s MAC address and precise timestamp, which is a privacy concern. However, v1 has an advantage in time-ordered B-tree indexes (like InnoDB) because monotonically increasing keys cause fewer index page splits — improving write throughput on very high-volume tables. For most applications, v4 is preferred; use v1 or ULID only when insert performance at scale is a priority.

When should I use UUID v5?

Use v5 when you need a stable, repeatable identifier for a known entity. Example: you want to assign UUID primary keys to product catalogue items that are identified by URL. Instead of storing a mapping table, you compute uuid.v5(productUrl, NS_URL) at runtime — the same URL always gives the same UUID. v5 is also used in content-addressable systems and for generating deterministic test fixtures.

Is UUID v5 cryptographically secure?

No. v5 uses SHA-1 which has known collision weaknesses. It is not intended for security applications. For a UUID that acts as a secret token, always use v4 (random). Use v5 only when you need deterministic, reproducible identifiers from known, non-secret inputs.

Are UUIDs case-sensitive?

No. RFC 4122 defines UUIDs as case-insensitive. 550E8400-E29B-41D4-A716-446655440000 and 550e8400-e29b-41d4-a716-446655440000 refer to the same UUID. Most implementations output lowercase. Systems accepting UUID input should normalise to lowercase before comparison.

What does UUID validation check?

A valid UUID must be exactly 36 characters in the format 8-4-4-4-12 hex digits separated by hyphens. The validator checks: correct total length, correct hyphen positions, all characters are hexadecimal, the variant bits (position 8) are set to 10xx₂ (RFC 4122 variant), and reads the version nibble (position 13) to report the UUID version (1–5, or 0 for Nil).

Related Tools

More in Developer

View category hub →