Skip to content
TabBench

UUID Generator

Generate UUIDs (GUIDs) — random v4, time-ordered v7, name-based v5 and more — up to 1,000 at a time, and read the version and creation time of any UUID.

Runs in your browser. Nothing you add is uploaded.

What the UUID Generator does

A UUID is a 128-bit identifier you can generate independently on any machine with a vanishing probability of collision — no coordination, no central sequence, no database round trip. This generator follows RFC 9562, the 2024 standard that replaced RFC 4122. Version 4 is 122 bits of randomness; version 7 starts with the creation time, so IDs sort in the order they were made, which keeps database indexes fast; versions 5 and 3 turn a namespace and a name into the same UUID every time. Make up to 1,000 at once in the format your code needs, or paste any UUID to see which version it is and, for time-based ones, when it was created. Everything uses your browser's cryptographic random source and stays on your device.

How to generate a UUID

  1. Pick a version: 4 for general use, 7 for database primary keys, 5 to derive an ID from a name such as a domain or URL.
  2. Choose how many you need — one for a quick test, or up to 1,000 for seed data. For version 5, type one name per line instead.
  3. Choose the format: standard, no hyphens, braces or urn:uuid:, and list them one per line, comma-separated, as JSON or as SQL values.
  4. Copy one, copy them all, or download the list. To check an existing UUID, switch to Inspect a UUID and paste it.

The UUID Generator runs entirely in your browser — nothing you enter is uploaded, stored, or logged.

When to use it

Assigning primary keys before insert

Generating the id client-side lets you build an entire object graph with valid references before anything reaches the database, which simplifies offline-first and optimistic-update patterns considerably.

Correlating requests across services

A UUID attached to an incoming request and propagated through every downstream call turns a distributed trace into a single greppable string.

Naming uploaded files safely

Storing an upload under a UUID rather than its original filename removes an entire class of path traversal and collision problems in one step.

Good to know

  • Version 4 UUIDs are random, so they scatter across a B-tree index. On very large tables this hurts insert performance — UUIDv7, which is time-ordered, is the modern answer.
  • UUIDs are case-insensitive by specification but conventionally written in lowercase. Normalise before comparing as strings.
  • Stored as text a UUID is 36 characters; stored as a native binary or uuid column it is 16 bytes. On large tables that difference is worth having.
  • Do not treat a UUID as a secret. It is unguessable, but it is not an access control mechanism.

Frequently asked questions

What is a UUID v4?

A Version 4 UUID is a 128-bit number generated using cryptographically random numbers.

Should I use UUID v4 or v7?

Use v7 for database primary keys: it starts with the creation time, so new rows are added at the end of the index instead of scattered through it, which keeps inserts fast. Use v4 when an ID must reveal nothing, not even when it was made.

What is the chance two UUIDs collide?

Negligible in any realistic system. You would need to generate roughly 2.7 × 10^18 version 4 UUIDs before reaching a 50% chance of a single collision. For comparison, that is more identifiers than there are grains of sand on Earth.

What is the difference between UUID v1, v4, and v7?

Version 1 derives from a timestamp and the machine's MAC address, which makes it sortable but leaks hardware information. Version 4 is purely random and leaks nothing, which is why it is the common default. Version 7 is a newer standard combining a timestamp prefix with randomness, giving you both database-friendly ordering and privacy. This tool generates version 4.

Can I use UUIDs as database primary keys?

Yes, and it is common. The trade-off is index locality: random v4 values insert all over the index rather than at the end, which increases page splits on very high-volume tables. Store them in a native uuid or binary(16) column rather than as text, and consider UUIDv7 if insert throughput is a concern.

Are these UUIDs cryptographically secure?

They are generated from crypto.getRandomValues(), the browser's cryptographically secure random source, so the values are unpredictable. That still does not make a UUID a suitable secret or session token on its own, because UUIDs routinely end up in logs, URLs, and analytics.

Why do all version 4 UUIDs have a 4 in the same position?

The 13th hexadecimal digit is fixed to '4' to identify the version, and the 17th is constrained to 8, 9, a, or b to encode the variant. Those six bits are why a v4 UUID carries 122 bits of randomness rather than the full 128.
  • JSON Formatter

    Format, validate and minify JSON with exact error locations.

  • Random Number Generator

    Generate fair random numbers: ranges, no repeats, decimals, PINs.

  • Regex Builder

    Build a regular expression from blocks, with live matches.

  • SQL Formatter

    Format, beautify, and minify SQL queries for Postgres, MySQL, and SQLite.