UUID / Hash Tools

UUID Generator

Create single or batch UUIDs for records, logs, and request tracing.

Generation options

Generated UUIDs

  • 9491dbae-2b62-4afa-9628-d2a7fa97d542
  • 22a54671-5e94-4533-927a-40f6b08f8772
  • d2eca865-a9ef-4f38-97c5-094fa557c8e6
  • 0208703a-9c75-42df-8d90-3b72eb0124bb
  • 5f1f7f89-c9cb-47a3-b30d-cad7cf800d4f

UUID v7 is time-ordered, while v4 is random. Formatting options are applied after generation.

Understand the format

How UUID Generator works

A UUID is a 128-bit identifier that any machine can generate independently, without asking a central service whether the value is already taken.

What the 36 characters actually contain

A UUID is 128 bits printed as 32 hexadecimal digits in five hyphen-separated groups of 8-4-4-4-12. Two of those digits are not random: the first digit of the third group encodes the version, and the first digit of the fourth group encodes the variant. In a version 4 UUID you will always see a 4 at that position and one of 8, 9, a, or b at the variant position, which leaves 122 bits of actual randomness.

Uniqueness therefore comes from probability rather than coordination. With 122 random bits, you would need to generate on the order of a billion UUIDs per second for roughly a century before a collision became likely. That is why services can mint identifiers offline, on a phone, or in a queue consumer without a shared sequence.

Version 4 and version 7 solve different problems

Version 4 is entirely random, which makes it excellent for correlation identifiers and terrible for database index locality. Because consecutive inserts land in random positions of a B-tree index, write-heavy tables suffer page splits and a larger working set.

Version 7, standardised in RFC 9562, puts a 48-bit Unix millisecond timestamp in the high bits and fills the rest with randomness. The result still looks like a UUID and remains globally unique, but values generated later sort after values generated earlier. That restores index locality and gives you a rough creation time for free, at the cost of revealing when the identifier was created.

Step by step

How to use UUID Generator

  1. Choose the version: v4 for random identifiers, v7 when you want time-ordered keys.
  2. Set how many identifiers you need, up to 25 per batch.
  3. Toggle hyphens, braces, and uppercase to match the format the destination system expects.
  4. Press Generate UUIDs, then copy the list or export it as CSV for seeding and test data.

Identifiers are generated in your browser with crypto.randomUUID and crypto.getRandomValues. Nothing is requested from or reported to a server.

Worked examples

UUID Generator examples explained

Version 4, default formatting

Input

version: v4, count: 2

Result

9f1c4a2e-6d3b-4f8a-9c21-7ae5b0d3f412
1b7e0c55-2f94-4a17-b0d8-6c3e9a15d720

The 4 at the start of the third group is the version nibble; the leading 9 and b of the fourth group are the variant bits.

Version 7, generated one second apart

Input

version: v7, count: 2

Result

0195a3f1-8c40-7b2e-8f31-2d9c4e7a10bb
0195a3f1-9028-7c6a-9d55-31be0f42a7c9

The first three groups encode the millisecond timestamp, so the two values sort in creation order as plain strings.

Reference

Common UUID versions compared

Common UUID versions compared
VersionContentSortable by timeTypical use
v1Timestamp plus MAC addressPartly, after byte reorderingLegacy systems. Leaks the generating host.
v4122 random bitsNoCorrelation IDs, external references, test data.
v748-bit Unix ms timestamp plus randomnessYes, lexicographicallyPrimary keys in write-heavy tables, event ordering.
Nil UUIDAll zero bitsn/aA defined placeholder: 00000000-0000-0000-0000-000000000000.

Practical Guide

How teams use UUID Generator

Common use cases

  • Create identifiers for mock requests, seeded records, or temporary workflow objects.
  • Generate batches for manual testing, spreadsheets, and load-test fixtures.
  • Produce stable sample values for documentation and API examples.

Checks before trusting the result

  • UUIDs are identifiers, not secrets; never treat possession of one as authorisation.
  • Confirm the receiving system accepts the version you picked if interoperability matters.
  • Keep generated identifiers separate from business-readable record keys such as invoice numbers.

Troubleshooting

Common mistakes and how to fix them

Using a UUID in a URL as though it were an access token.
Unguessable is not the same as authorised. Check permissions on the server for every request, even when the identifier is random.
Storing UUIDs as 36-character text in a large table.
Where the database supports it, use a native UUID or 16-byte binary column. The text form roughly doubles the storage and the index size.
Expecting version 4 values to sort by creation time.
They are random. Either keep a created_at column or switch to version 7.

FAQ

UUID Generator questions, answered

Can two UUIDs ever collide?

In principle yes, in practice no, provided they come from a cryptographically secure random source. The risk becomes real only when a weak or poorly seeded generator is used, which is why this page uses the browser crypto API.

Are UUIDs case sensitive?

The specification says hexadecimal digits must be produced in lowercase but compared case-insensitively. Some Microsoft ecosystems display uppercase. Normalise on input if you compare them as strings.

What do the braces mean?

They are a Microsoft registry and COM convention for GUIDs. The value is identical; only the surrounding text differs.

Is UUID v7 safe to expose publicly?

It is unique and unguessable, but it embeds a creation timestamp. If disclosing when a record was created is sensitive, use v4 externally and v7 internally.

Should a UUID be my primary key?

It is a reasonable choice when records are created by many independent clients. Prefer v7 or another time-ordered identifier to avoid the index fragmentation that random keys cause on large tables.

Go deeper

Specifications and guides