UUID Generator

Generate one or many RFC-4122 version 4 UUIDs, entirely in your browser. Useful for database keys, test fixtures, and request IDs.

  • bfe0af8f-3b40-42e8-a50f-90c2deb34d64
  • b5f5d37b-1bd6-4a59-a4d5-0bc259bb9257
  • 1a1d1d6e-95dd-4070-9ec8-e57c319f8b51
  • 122a4743-454b-4caa-86d6-f39148994579
  • 5bc0a613-103e-412e-a1c3-3df57e77999b

Example input

Click Generate

Example output

3f9b2c1a-5d4e-4a11-9c2f-8e7d6a5b4c3d

What is a UUID Generator?

A UUID (Universally Unique Identifier) is a 128-bit value formatted as 32 hex digits split into five groups (8-4-4-4-12), like 3f9b2c1a-5d4e-4a11-9c2f-8e7d6a5b4c3d. The version 4 variant this tool generates is random rather than derived from a timestamp or hardware address — 122 of its 128 bits are chosen randomly, which makes the odds of two systems ever generating the same UUID by accident astronomically small, without needing a central authority to hand out IDs. That's what makes UUIDs useful for distributed systems where multiple services need to generate unique IDs independently.

When to use it

UUIDs show up constantly as primary keys in databases (especially when you want IDs generated client-side or across multiple services without coordination), as request IDs for tracing a single request through logs across microservices, as API keys or session tokens, and as unique identifiers for test fixtures so parallel test runs don't collide. If you're building a REST API and need a placeholder resource ID while writing example requests, generating a batch here is faster than making one up.

How it works

This tool uses crypto.randomUUID(), a built-in browser API backed by the operating system's cryptographically secure random number generator — the same underlying entropy source used for generating encryption keys. That's an important distinction from UUIDs generated with Math.random(), which is not cryptographically secure and can theoretically be predicted; crypto.randomUUID() doesn't have that weakness. The version (4) and variant bits are set automatically per the RFC 4122 spec so the output is a standards-compliant v4 UUID that any system expecting one will accept.

Frequently asked questions

What's the difference between a UUID and a GUID?

They're effectively the same thing — GUID (Globally Unique Identifier) is Microsoft's term for the same 128-bit identifier format standardized as UUID in RFC 4122. The formats are interchangeable in practice.

Can two UUID v4 values ever collide?

Theoretically yes, but the probability is negligible — with 122 random bits, you'd need to generate roughly 2.7 quintillion UUIDs before there's a 50% chance of a single collision. For virtually all practical purposes, UUID v4 values are treated as guaranteed unique.

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

UUID v4 is fully random, which can hurt database index performance because new rows insert at random locations in the index. UUID v7 (a newer standard) embeds a timestamp so IDs sort roughly chronologically, giving better insert performance for large tables. If your database performance is a concern, v7 is usually the better choice for primary keys specifically.

Is it safe to use a UUID as a security token or API key?

A cryptographically random UUID v4 (like the ones this tool generates) has enough entropy to be unguessable, but UUIDs aren't designed as secrets — they're commonly logged, shown in URLs, and displayed in UIs. For anything security-sensitive, use a dedicated secret generated for that purpose rather than repurposing a UUID.