UUID Generator

Crypto

Generate cryptographically secure UUID v4 and GUID values locally in your browser. Create unique IDs for database keys, tokens and sessions in one click.

UUIDs

V4 Random (RFC 4122) · 0 generated

About UUID Generator

A UUID is a 128-bit globally unique identifier, for example f47ac10b-58cc-4372-a567-0e02b2c3d479. This tool calls the browser native crypto.randomUUID() to produce RFC 4122 v4 random UUIDs, and also generates time-sortable UUID v7 per RFC 9562 for insertion-friendly primary keys. Common uses include database keys, deduplication IDs in distributed systems, log trace numbers, and temporary file names. All computation runs locally in your browser and the generated UUID never leaves your device. For example, generate ten v4 random UUIDs at once, shaped like f47ac10b-58cc-4372-a567-0e02b2c3d479, ready to use as table keys or message IDs.

How to Use

  1. Open the UUID Generator page
  2. Select the number of UUIDs to generate (1-1000)
  3. Click the Generate button or customize options (uppercase, hyphens, braces)
  4. Click the copy button next to any UUID or 'Copy All' to copy all results

Use Cases

  • Database primary keys — Replace auto-increment IDs in distributed systems to avoid key collisions across shards or merge writes.
  • API request IDs — Tag each HTTP request with a unique marker for logging, tracing, and distributed correlation.
  • Frontend list keys — Assign keys to Vue/React list items that lack a stable ID, preventing unnecessary re-renders.
  • File naming — Avoid name collisions during batch uploads or caching — UUID-named files virtually never clash.
  • Session tokens — Combined with a signature, build unguessable session IDs or one-time tokens.
  • Correlation identifiers — Assign unique IDs to log entries, trace spans, or events across microservices to correlate distributed activity.
  • Database replication — Use UUIDs as primary keys in multi-master or offline-first databases to avoid conflicts when merging writes from different nodes.

FAQ

Can UUID v4 collide?

In theory yes, but the probability is negligible. UUID v4 has 122 random bits — generating 10 billion UUIDs gives roughly 50% chance of one collision. Treat it as never colliding in practice.

Are UUID and GUID the same?

Yes. GUID is Microsoft's name for UUID; the formats are identical and interchangeable.

Why does my UUID always start the 13th character with 4?

That digit encodes the UUID version, fixed to 4 for v4. If you need time-sortable IDs, try our ULID generator.

Is UUID safe to use as a secret key?

v4 was not designed for cryptography, but 122 bits of entropy exceeds typical session tokens. For higher security, use our Token Generator instead.

How can it generate UUIDs without a server?

The browser provides crypto.getRandomValues(), a cryptographically reviewed secure random source — equivalent in quality to a server's /dev/urandom.

Which should I choose, UUID v4 or v7?

Choose v4 for pure randomness when you want to avoid leaking generation time or need maximum library compatibility. Choose v7 when you want new records to naturally sort to the end of an index — its first 48 bits are a millisecond timestamp, so you can read creation time back from it. For high-throughput writes into B+Tree primary keys like InnoDB, v7's near-sequential values improve index locality and cut page splits, so many new projects prefer it. Both share the same canonical display format.

Is a UUID without hyphens still valid?

Yes. A UUID is fundamentally 128 bits of hex data; the hyphens are only a conventional formatting choice. Removing them yields a 32-character hex string that is the same identifier, and many databases store it in compact forms like BINARY(16). Any mismatch only matters if one layer expects one format and another expects the other — so keep ends consistent and reformat to 8-4-4-4-12 when an API or library requires the canonical shape.

Advertisement