Skip to main content
Developer Tools Developer Tools

UUID Generator

Generate version 1 (time-based) or version 4 (random) UUIDs instantly. Runs entirely in your browser for version 4.

Calculator

How UUID Generator Works

What is a UUID?

A UUID (Universally Unique Identifier), also called a GUID (Globally Unique Identifier), is a 128-bit value used to identify information without requiring a central authority to hand out IDs. Written out, it looks like f47ac10b-58cc-4372-a567-0e02b2c3d479 — 32 hexadecimal digits grouped into five sections by hyphens, 36 characters in total. Any two systems, anywhere, generating UUIDs independently can be confident their values won't collide — no coordination, database lookup, or central registry required.

UUID Versions

The UUID standard (RFC 4122) defines several versions, each with a different generation strategy encoded in the identifier itself. This tool supports the two most common:

VersionBased onTypical use
Version 1Timestamp + node (network) identifierSystems that benefit from roughly time-ordered IDs
Version 4Random (or pseudo-random) bitsGeneral-purpose unique IDs — the default choice for most applications

Other versions exist — version 3 and 5 derive a UUID deterministically from a namespace and name via a hash, which is a meaningfully different use case (repeatable, not random) best served by a dedicated tool rather than bolted onto this one.

UUID v1 vs v4

Version 1 UUIDs embed the exact moment they were generated and a node identifier, which historically was the generating machine's network hardware (MAC) address. This makes v1 UUIDs partially predictable and, more importantly, capable of leaking information about when and where they were created — which is why RFC 4122 also allows the node identifier to be a randomly generated value instead of a real hardware address when privacy matters.

Version 4 UUIDs contain no such information — they are (for all practical purposes) 122 bits of randomness, with the remaining 6 bits fixed to mark the version and variant. This makes v4 the simpler, safer default for nearly all modern use: identifying database rows, API resources, session tokens, file names, and request IDs.

When to Use UUIDs

  • Distributed ID generation. Multiple services or database shards can generate IDs independently without coordinating with each other or a central counter.
  • Non-sequential primary keys. Unlike auto-incrementing integers, a UUID doesn't reveal how many rows exist or let someone guess adjacent IDs by incrementing.
  • Idempotency keys and request IDs. A client-generated UUID lets a server recognize and safely ignore a duplicate/retried request.
  • File and object naming. Guarantees a new upload's name won't collide with an existing one, without checking first.

Collision Probability

For version 4 UUIDs, the odds of two randomly generated values ever colliding are vanishingly small: generating a billion UUIDs per second for about 85 years gives roughly a 50% chance of a single collision anywhere in that entire set. In practice, for any realistic application, UUID v4 collisions are not a risk worth engineering around.

Common Mistakes

  • Treating a UUID as sortable when it isn't. Version 4 UUIDs are random and carry no time ordering — don't rely on insertion order matching UUID order. Version 1 UUIDs are roughly time-ordered but not designed as a general sorting key.
  • Assuming a UUID is secret or unguessable in a security sense. A v4 UUID is unpredictable, which is useful, but a UUID is not a substitute for an access-controlled credential — anyone who has the UUID (e.g. in a shared URL) can use it.
  • Using version 1 when generation source matters for privacy. Because v1 embeds a timestamp and node value, it can reveal more about the generating system than intended.
  • Storing UUIDs as plain text unnecessarily. A UUID's fixed 36-character string form is convenient for display, but many databases offer a native 16-byte binary UUID type that's more compact and faster to index.

Security Considerations

Version 4 UUIDs generated by a cryptographically secure random source (as this tool does, both in the browser via crypto.randomUUID() and on the server via Python's uuid module) are safe to use anywhere unpredictability matters. Version 1 UUIDs are not designed for that: their embedded timestamp and node identifier are not secret, and should not be relied upon when the generating time or system needs to stay private. When in doubt, prefer version 4.

Related Tools

Generating unique identifiers is one of several developer utility tasks: create a text fingerprint with the Hash Generator, encode binary data with the Base64 Encoder, inspect a signed token with the JWT Decoder, reformat structured data with the JSON Formatter, or validate an ID's shape with the Regex Tester.

Accuracy & Sources

Last reviewed: August 2026. Formula source: RFC 4122 — A Universally Unique IDentifier (UUID) URN Namespace. All calculations run in your browser. No data is sent to any server.

Frequently Asked Questions

None in practice — GUID (Globally Unique Identifier) is Microsoft's name for the same 128-bit identifier standard defined as UUID (Universally Unique Identifier) in RFC 4122. The terms are used interchangeably.

Version 4 for almost all cases — it's simple, contains no embedded information, and has negligible collision risk. Version 1 embeds a timestamp and a node identifier, which can be useful when rough time-ordering matters, but also means the UUID reveals more about when and where it was generated.

Theoretically yes, but the probability is astronomically small for version 4 UUIDs — generating a billion per second for about 85 years gives roughly a 50% chance of a single collision across the entire set. For any realistic application, this isn't a practical risk.

A version 4 UUID is unpredictable, which prevents someone from guessing adjacent IDs the way they could with a sequential number. But it isn't a secret — anyone who obtains the UUID (e.g. by seeing the URL) can use it, so a UUID alone isn't a substitute for proper access control on sensitive resources.

No — v3 and v5 derive a UUID deterministically from a namespace and a name using a hash (MD5 for v3, SHA-1 for v5), which is a different use case from the random (v4) and time-based (v1) generation this tool focuses on. That deserves its own dedicated tool rather than being bolted on here.

For Version 4, no — it's generated entirely in your browser using the Web Crypto API and never leaves your device. Version 1 UUIDs are generated server-side (the browser has no equivalent API), via a transient computation that isn't stored or logged.