You have seen them in URLs, database tables, error logs and file names: long strings of letters and digits broken up by hyphens, shaped like xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx with real values in place of the x characters. Those strings are UUIDs, the quiet plumbing of modern software. Every system that grows beyond one machine needs identifiers that several parts can create at once without colliding, and the UUID is the standard answer.

This explainer covers what a UUID is, how to read its shape, why version 4 values can be minted anywhere without permission, and where they turn up in practice, and shows how to make your own with the free UUID Generator on Ovatly.

Contents

  • Quick answer
  • The anatomy: 128 bits in five groups
  • Why randomness replaces a central counter
  • Where UUIDs are used
  • How to generate a UUID, step by step
  • Worked example: reading a generated value
  • Limitations and alternatives
  • Common mistakes
  • FAQs
  • Conclusion

Quick answer

A UUID is a 128-bit identifier written as 32 hexadecimal digits in five hyphen-separated groups of 8, 4, 4, 4 and 12. The version 4 kind fills 122 of its bits at random, so anyone can generate one that is practically guaranteed unique without asking any central server. That is why UUIDs are the standard identifier for database rows, files, sessions and API resources. To make one, open the UUID Generator, choose a count from 1 to 100, press Generate UUIDs and copy the result.

The anatomy: 128 bits in five groups

A UUID is a number: 128 bits, nothing more than that. The familiar string form is simply that number written in hexadecimal and split into five groups for readability, sized 8, 4, 4, 4 and 12 digits, which is why people describe the shape as 8-4-4-4-12. Count the digits and you always get 32, plus four hyphens.

Not every bit is free. In a version 4 UUID, two positions are fixed markers. The first digit of the third group is always 4: that digit declares the version, telling any reader how the value was generated. The first digit of the fourth group is always one of 8, 9, a or b: that marks the variant. Learning those two positions lets you recognise a version 4 value on sight and spot a malformed one instantly.

The remaining 122 bits are random. The canonical text form is lowercase with hyphens, which is what most databases and APIs expect, and it is the form the Ovatly generator returns, so values paste straight into the systems that consume them.

Why randomness replaces a central counter

The obvious way to hand out unique identifiers is a counter: 1, 2, 3, and so on. Counters work until more than one machine needs to mint identifiers at once, because two servers will both decide that the next number is theirs. Fixing that means coordinating: a central authority, a round trip and a bottleneck.

Version 4 UUIDs sidestep the whole problem. With 122 random bits drawn from a cryptographic random source, the space of possible values is so large that independent generators effectively never collide: you would need to generate billions per second for years to expect one accidental duplicate. So there is no registry to consult, no counter to lock, and no permission to ask. Any part of a system, including a browser tab, can mint a valid identifier on its own. That property, more than the format itself, is why UUIDs spread everywhere.

Where UUIDs are used

UUIDs appear wherever identifiers are created in more than one place, or wherever an identifier must be unguessable and stable for the life of a thing.

  • Database rows. Tables written by several servers, merged between systems or seeded from fixture files use UUIDs as primary keys, because no writer has to ask a central counter for the next value.
  • Files. Uploaded files, exports and generated documents get UUID names so two users uploading at the same moment never overwrite each other, and the original file name stays private.
  • Sessions. A session identifier must be minted the moment a user arrives and be impractical to guess. A random UUID fits, which is why session identifiers so often have this shape.
  • API resources. When an API creates a resource, the UUID becomes its public handle in URLs and responses, stable for its whole life and independent of internal numbering.

In each case the appeal is the same: practically guaranteed unique, mintable anywhere, and carrying no ordering or ownership information in the value itself.

How to generate a UUID, step by step

  1. Open the UUID Generator and choose how many UUIDs you need, from 1 to 100.
  2. Press Generate UUIDs. The tool creates version 4 (random) UUIDs with your browser's cryptographic random source; batches of 100 are instant because generation is local.
  3. Copy one value, or choose Copy all to take the whole list, one per line.
  4. Paste the value where needed, in the canonical lowercase hyphenated form the tool gives you.
  5. Generate again whenever you need a fresh batch. Values are never repeated or stored, so each press produces new identifiers.

Worked example: reading a generated value

Generate a single UUID and read it back in three checks. First, the shape: five groups of 8, 4, 4, 4 and 12 hexadecimal digits, separated by hyphens, 32 in total. Second, the version: the third group starts with 4, confirming a version 4 value, filled randomly. Third, the variant: the fourth group starts with 8, 9, a or b, confirming the standard layout.

Then think about what those 122 random bits mean for the value you are holding. It was created in your browser, with no server involved and no list consulted, and the chance that anyone else has ever generated the same value is small enough that the industry simply treats UUIDs as unique. That is the design working as intended.

Limitations and alternatives

A UUID is an identifier, not a credential. It works as an unguessable identifier, but where real credential strength is required, prefer a longer password from this site's Password Generator, which gives you more entropy and control over the character set. Do not promote a bare UUID into an API key or password substitute.

Random values also carry no ordering information. The generator on this page creates version 4 (random) UUIDs only; if you need time-ordered identifiers, so database inserts sort by creation time, look at UUID v7 in a dedicated library instead.

And the values are not archived for you. They exist only in the page until you close it, so copy what you need before you navigate away. There is no history to recover them from, which is a deliberate privacy property, not a missing feature.

Common mistakes

  • Using a UUID as a password or API key. It is unguessable, but a dedicated credential gives you more entropy and control over the character set.
  • Expecting UUIDs to sort by time. Version 4 values are random, so adjacent values say nothing about creation order. Use a time-ordered scheme such as v7 if ordering matters.
  • Reformatting the value. Uppercase forms or stripped hyphens can fail strict parsers or mismatch what a database stored. Keep the canonical lowercase hyphenated form.
  • Closing the tab before copying. Nothing is stored, so a generated batch you did not copy cannot be recovered.
  • Generating one at a time for a bulk job. The tool makes up to 100 per batch; use Copy all and paste the list instead.

FAQs

What is a UUID in simple terms? A 128-bit identifier written as hexadecimal digits with hyphens, designed so that anyone can generate one that is practically guaranteed unique without coordinating with a central server.

Where are UUIDs used? They are the standard way to identify database rows, files, sessions and API resources. Anywhere several parts of a system need to mint identifiers independently, a UUID fits.

What do the groups in a UUID mean? The text form has five groups of 8, 4, 4, 4 and 12 hexadecimal digits. In a version 4 value the third group starts with 4, marking the version, and the fourth group starts with 8, 9, a or b, marking the variant. Everything else is random.

Can two UUIDs ever be identical by accident? A version 4 UUID has 122 random bits. The chance of an accidental duplicate is so small that the industry treats the values as unique; you would need to generate billions per second for years to expect one collision.

Is a UUID a secret I can use as a password? No. A UUID is an identifier, not a credential. It works as an unguessable identifier, but for credentials prefer a longer password from this site's Password Generator, which gives you more entropy and control over the character set.

Conclusion

A UUID is a small idea with large consequences: a 128-bit value, mostly random, that anyone can mint without coordination and everyone can trust to be unique. That is why these strings identify database rows, files, sessions and API resources. The UUID Generator makes them locally in your browser, from a single value to a batch of 100, in canonical form, and stores nothing. Whether the GUID in a Microsoft tool is a different beast is settled in the companion guide, UUID vs GUID: Are They the Same Thing. More tools for this kind of work live in the Developer Tools archive.