Web & Developer Tools

UUID Generator

Generate Universally Unique Identifiers (UUIDs/GUIDs) instantly. Create random v4 UUIDs for database keys, software development, and unique system tracking.

UUID Generator — Online Calculator

The UUID Generator creates Universally Unique Identifiers in your browser, in bulk if you need them: choose a version (v1, v4, or v7), a count from 1 to 100, and an output format (standard hyphenated, no hyphens, braces, quoted, or a JSON array), with an uppercase option, and copy identifiers that are generated locally with cryptographic randomness and never transmitted anywhere.

The Versions, and Which to Choose

A UUID is a 128-bit value written as 32 hex digits in five groups (8-4-4-4-12), with a few bits reserved to declare its version and variant. Version 4 is built from 122 bits of pure randomness: no meaning, no ordering, no information leakage, and the right default for primary keys, session tokens, and public-facing identifiers. Version 1 is time-based, embedding a timestamp (and in classic implementations a node identifier), so its values roughly sort by creation time but reveal when, and potentially where, they were minted. Version 7, the modern standard (RFC 9562), leads with a Unix millisecond timestamp followed by randomness: time-ordered like v1 without the node exposure, and increasingly the recommended choice for database primary keys because new rows append at the index's end instead of scattering across it. This generator builds v4 and v7 from the browser's cryptographic random source, and v1 from the current timestamp with random fill, matching each version's structure including the version nibble (the 4, 1, or 7 that starts the third group) and the variant bits (the 8, 9, a, or b that starts the fourth).

Parameters

| Input | Meaning | |---|---| | Version | v1 (time-based), v4 (random), v7 (time-ordered) | | Count | 1 to 100 identifiers per run | | Format | Standard, no-hyphen, braces, quoted, or JSON array | | Uppercase | Uppercase hex (some systems, notably Windows GUID displays, prefer it) |

Worked example

A typical v4 output is 123e4567-e89b-42d3-a456-426614174000: read the third group 42d3 and the leading 4 declares the version; read the fourth group a456 and the leading a sits in the 8 to b range that declares the standard variant. The same identifier in this generator's other formats is 123e4567e89b42d3a456426614174000 (no hyphens), {123e4567-e89b-42d3-a456-426614174000} (braces, the Windows registry style), or an element of a JSON array when you generate several at once for seeding a test database. Checking those two marker characters is the fastest way to validate a UUID someone hands you: a "v4" whose third group does not start with 4 is not a v4, whatever its source claims.

Collision mathematics, stated precisely

With 122 random bits, v4 offers about 5.3 x 10^36 possible values. Collisions obey the birthday bound, so the 50% probability point arrives after roughly 2^61 (about 2.3 x 10^18) generated identifiers: minting a billion per second, continuously, reaches that coin-flip after about 85 years, and any realistic system operates so far below the bound that a duplicate v4 is more likely to indicate a broken random source than bad luck, which is precisely why generation must use a cryptographic RNG (as this tool does) rather than a seeded pseudo-random function whose outputs repeat across processes. Time-ordered versions trade a slice of that randomness for their timestamp bits (v7 carries 74 random bits, still a collision space no real deployment approaches) in exchange for sortability.

UUIDs in practice: the honest trade-offs

UUID keys buy global, coordination-free uniqueness: clients, microservices, and offline devices can all mint identifiers that merge without a central sequence, and unguessable keys avoid the enumeration leaks of sequential integers (an order URL containing 100247 invites trying 100246). They cost index size and locality (16 bytes against 8 for a bigint, and random v4 inserts fragment B-tree indexes, the specific problem v7 was standardized to solve), they are hostile to humans in URLs and support calls, and they make poor secrets in themselves: a UUID is an identifier, not a credential, and session security still needs proper token design, expiry, and transport protection around it. GUID is the same standard under Microsoft's name; the terms are interchangeable, with GUID displays favouring uppercase and braces in Windows tooling, both available as format options here.

Frequently Asked Questions

Are the UUIDs from this tool safe to use in production?

They are generated with the browser's cryptographic random number generator, the same entropy source production libraries use, and nothing is logged or sent to a server. For regulated or audited environments, generate identifiers inside your own stack with its standard library, not because the values differ but because provenance matters there.

Why would I choose v7 over v4?

When the identifier is a database primary key at real scale: v7's time ordering keeps inserts appending to the index (better cache behaviour, less fragmentation, smaller operational pain) while remaining effectively unguessable in its random tail. For tokens and opaque references with no ordering value, v4 remains the simpler default.

Can a UUID contain my data, like a timestamp or user ID?

Not in these versions, by design: apart from the version/variant markers and (in v1/v7) the creation timestamp, the bits are random. Embedding data in identifiers leaks it everywhere the identifier travels, including logs and URLs; keep identifiers meaningless and store data in records the identifier points to.

Related Tools