Sooner or later you will meet a UUID that does not look like the ones you generate: one from an older system that seems to sort by age, or from a migration script that produces the same identifier every run. Nothing is broken: those values are different versions of the same format, built by different recipes.

This guide explains the four versions you are likely to meet, v1, v3, v4 and v5, using the free UUID Generator on Ovatly as the reference point. One fact up front, so nothing below misleads you: that generator makes version 4 UUIDs only. The other versions are explained as concepts: they help you read values other systems produce, and the tool does not offer them as a choice.

Contents

  • Quick answer
  • One shape, several recipes
  • v1: built from time and the machine
  • v3 and v5: built from a name
  • v4: built from randomness
  • Worked example: reading the version digit
  • Which version should you use?
  • Limitations and alternatives
  • Common mistakes
  • FAQs
  • Conclusion

Quick answer

A UUID is a 128-bit identifier in a fixed hyphenated shape, and the version digit, the first digit of the third group, tells you how the bits were chosen. v1 encodes the time and the generating machine. v3 and v5 hash a namespace and a name, so the same input always gives the same UUID. v4 is random: 122 bits from a random source, so it needs no coordination and leaks no information. The UUID Generator makes v4 only, in batches of 1 to 100.

One shape, several recipes

Every UUID, whatever the version, is 32 hexadecimal digits in five groups of 8, 4, 4, 4 and 12, separated by hyphens. The format never changes; what changes is the recipe for filling the digits.

Two positions are reserved. The first digit of the third group is the version marker: 1, 3, 4 or 5 for the versions covered here. The first digit of the fourth group marks the variant, and on values from this generator it is always one of 8, 9, a or b. Everything else is payload, and each version fills it differently.

That shared shape is why versions interoperate: a database column that stores UUIDs does not care which version a value is. The version matters to whoever generates or later reads the value.

v1: built from time and the machine

Version 1 is the original recipe. It builds the value from the moment of generation, a clock timestamp, combined with the node, typically the machine's network hardware address. A small sequence number separates values minted in the same instant.

Two consequences follow. First, v1 values roughly sort by creation time, because the timestamp sits inside them. Second, they are not anonymous: a v1 UUID carries evidence of when it was made and something about the machine that made it. You will still meet v1 values in long-lived databases and legacy tooling. For public identifiers, most people now prefer a recipe that reveals nothing.

v3 and v5: built from a name

Versions 3 and 5 take a different approach: no clock, no randomness. You start with a namespace, itself a UUID naming a context such as a DNS namespace, and a name within it, such as a domain or a product code. The version hashes the namespace and name together and formats the result as a UUID. v3 uses MD5 for that hash; v5 uses SHA-1, which is why v5 is the one usually recommended of the two.

The defining property is determinism. The same namespace and name always produce the same UUID, on any machine, at any time. That makes name-based versions useful when separate systems must agree on an identifier for the same named thing without asking each other: each side derives it independently and gets the same value. Typical jobs: deriving stable identifiers for imported records, integrations and content keys.

The flip side is predictability: anyone who knows the namespace and can guess the name can compute the UUID. Name-based values are identifiers, not secrets.

v4: built from randomness

Version 4 drops both the clock and the name. Apart from the fixed version and variant markers, every bit is random: 122 random bits in each value. The UUID Generator creates v4 values using your browser's cryptographic random source, in the canonical lowercase hyphenated form most databases and APIs expect.

Randomness buys two things. The first is independence: no central server, no coordination, yet two generators producing values at the same moment will, for all practical purposes, never collide; you would need to generate billions per second for years to expect one duplicate. The second is privacy: a v4 value encodes nothing about when or where it was made.

That is why v4 became the default almost everywhere, and why this generator keeps it simple: it makes v4 only, one at a time or in batches of up to 100, with nothing uploaded or stored. The values exist only in the page until you close it.

Worked example: reading the version digit

Take a generated value and check it against the pattern xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx. Read it in three steps. First, count the groups: 8, 4, 4, 4 and 12 hexadecimal digits. Second, look at the third group: it starts with 4, which tells you the recipe was randomness. Third, look at the fourth group: it starts with 8, 9, a or b, confirming the standard variant.

Now apply the same reading to a value from another system. If the third group starts with 1, you are holding a time-and-machine value, probably from an older system. If it starts with 3 or 5, some process derived that identifier from a namespace and a name, and the same derivation would reproduce it exactly. The digit turns an opaque string into a small piece of history.

Which version should you use?

For general identifiers (database rows, files, sessions, API resources), choose v4: unique without coordination, free of embedded information, supported everywhere, and the only version this page generates.

Choose v5, through your language or database tooling, when an identifier must be re-derivable from a known name, or two systems must agree on one without communicating. Treat v1 as a legacy format you will read more often than create.

Limitations and alternatives

The honest limitation of this page is also its design: the generator makes version 4 only. There is no version selector, and no setting turns it into a v1 or v5 tool. Projects that need another version should use the UUID support in their programming language or database, which is where deterministic and time-based generation normally belongs.

Random v4 values also carry no ordering information, so rows keyed by them will not sort by creation time. The tool's own guidance is to look at UUID v7 in a dedicated library if you need time-ordered identifiers; v7 sits outside the four versions covered here, and this generator does not offer it.

And as with any UUID version, an identifier is not a credential. A v4 value works as an unguessable identifier, but for API keys and passwords prefer a longer password from this site's Password Generator, which gives more entropy and control over the character set.

Common mistakes

  • Assuming all UUIDs are random. Only v4 is. A value starting its third group with 1, 3 or 5 was built from time or a name, not randomness.
  • Treating a v5 UUID as secret. It is deterministic: anyone who knows the namespace and guesses the name can reproduce it.
  • Ignoring what v1 reveals. Time-and-node values can expose when an identifier was minted and something about the machine, which matters for public-facing IDs.

FAQs

Which UUID version does this generator make? Version 4 only: every value is random, created with your browser's cryptographic random source, in batches of 1 to 100, with no version selector to set.

How can I tell which version a UUID is? Look at the first digit of the third group: that digit is the version marker. Values from this generator always show 4 there, following the pattern xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx, with the fourth group starting with 8, 9, a or b.

Why would anyone use v3 or v5 instead of v4? Because they are deterministic. Hashing the same namespace and name always yields the same UUID, so two systems can independently derive the same identifier for the same named thing. v3 uses MD5 and v5 uses SHA-1.

Does a v1 UUID reveal anything about the machine that made it? It can. v1 values are built from the time of generation and the node, typically the machine's network hardware address, so they can reveal when a value was made and something about the machine behind it.

Can I generate v1, v3 or v5 UUIDs on this page? No. This generator makes version 4 only. For another version, use the UUID support built into your programming language or database.

Conclusion

The version digit in a UUID is a small label with a lot behind it: time and machine in v1, a hashed name in v3 and v5, and pure randomness in v4. Knowing the recipes lets you read any identifier you are handed, and choose v4 for most new work. When you need values in bulk, the companion guide shows how to generate and copy a whole batch at once.

Related guide: How to Generate Multiple UUIDs at Once.

More tools for this kind of work live in the Developer Tools archive.