BrowserTools
Advertisement
Home / Generators / UUID Generator (v1, v4, v7)

UUID Generator (v1, v4, v7)

Generate RFC 4122 UUIDs in version 1, 4 or 7 — single or in bulk, copy or download.

Loading UUID Generator (v1, v4, v7)… If nothing happens, please enable JavaScript.

Frequently asked questions

Are generated UUIDs sent to a server?
No. All generation happens inside your browser tab using the Web Crypto API. The UUIDs exist only in memory and are never transmitted over the network. You can verify this with your browser's developer tools Network tab.
What is the technical difference between UUID v1, v4, and v7?
Version 1 encodes a 60-bit timestamp (100-nanosecond intervals since October 1582) plus the host MAC address. Version 4 is 122 bits of cryptographic randomness with the remaining 6 bits set to indicate the version and variant. Version 7 uses a 48-bit Unix millisecond timestamp followed by 74 random bits, making it both unique and sortable by creation time.
How likely is a UUID v4 collision?
Extremely unlikely. With 122 random bits, the probability of generating even one duplicate reaches 50% only after approximately 2.71 × 10^18 UUIDs have been created. Generating one billion UUIDs per second continuously for 100 years would still leave the collision probability near zero — around 0.000000006%.
Why should I use v7 instead of v4 for database primary keys?
UUID v4 values are fully random, which causes random insertion points in B-tree indexes. At scale this leads to frequent page splits and cache misses, slowing write throughput significantly. UUID v7's timestamp prefix means new records insert near the end of the index, just like auto-increment integers, while still being globally unique without coordination.
Can I use this UUID as a cryptographic secret or token?
A UUID v4 from `crypto.getRandomValues` has 122 bits of entropy, which is technically sufficient for many token use cases. However, UUIDs are conventionally formatted and publicly recognised as identifiers, not secrets. For bearer tokens, session keys, or API keys, consider generating a raw random byte string and encoding it as base64 instead.
What does GUID mean and is it the same as UUID?
GUID stands for Globally Unique Identifier and is Microsoft's name for the same concept, originally used in COM/DCOM component registration in the 1990s. Technically a GUID follows the same RFC 4122 structure, so a UUID and GUID are interchangeable. The only practical difference is formatting conventions: GUIDs are sometimes displayed in braces like `{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}`.
Can I generate UUIDs offline?
Yes. This tool is a static web page with no server dependencies for the generation logic. Once the page is loaded, you can disconnect from the internet and continue generating UUIDs indefinitely, because everything runs in the browser's JavaScript engine.
What is a common mistake when using UUID v1?
Embedding MAC addresses in v1 UUIDs means every identifier your system creates contains a fingerprint of the machine that generated it. This has privacy implications — it was one of the factors linking the Melissa virus author to his computer in 1999. For any user-visible or publicly logged identifier, avoid v1.
What format does a UUID follow?
A UUID is always 32 hexadecimal digits split into five groups by hyphens: 8-4-4-4-12 characters, for example `550e8400-e29b-41d4-a716-446655440000`. The total is 36 characters including hyphens or 32 without. The 13th hex digit indicates the version (1, 4, or 7) and the 17th indicates the variant (always 8, 9, a, or b in standard UUIDs).
Can I bulk-generate UUIDs and download them as a file?
Yes. Set the count to the desired number — up to several thousand — and use the Download button to save a plain text file with one UUID per line. This is useful for pre-generating IDs for database seed scripts, test fixtures, or migration files.

About UUID Generator (v1, v4, v7)

A UUID (Universally Unique Identifier), also known as a GUID in Microsoft ecosystems, is a standardised 128-bit value used to label entities — database rows, files, network nodes, transactions — without any central authority issuing the IDs. The standard is defined in RFC 4122 and organised into versions, each with a different generation strategy. Version 1 encodes a timestamp and the host's MAC address; version 4 uses 122 bits of cryptographic randomness; and the newer version 7 combines a millisecond-precision Unix timestamp with random bits, making it both unique and lexicographically sortable.

Distributed systems are the primary use case for UUIDs. When you have multiple servers, microservices, or offline-capable mobile clients all creating records simultaneously, coordinating a single auto-incrementing integer counter becomes a bottleneck or a source of conflicts. UUIDs sidestep this entirely: any node can generate a globally unique ID independently, and the records can be merged later without collision. They appear everywhere from database primary keys and idempotency tokens in payment APIs, to session identifiers, content-addressable file names, and trace IDs in observability pipelines.

This tool generates UUIDs entirely in your browser using the Web Crypto API. For v4, it calls `crypto.randomUUID()` when available (Chrome 92+, Firefox 95+), falling back to `crypto.getRandomValues` with manual formatting otherwise. For v7, it reads `Date.now()` for the 48-bit timestamp prefix and fills the remaining bits with cryptographic randomness. No identifiers are transmitted to any server, and nothing is logged. You can generate a single UUID or a bulk batch for import into a test fixture or migration script.

A common misconception is that UUIDs are opaque hashes. They are not — v1 UUIDs embed your MAC address and a timestamp, which can leak device identity. For privacy-sensitive contexts, always prefer v4 or v7. Another pitfall is using UUIDs as sequential database keys with B-tree indexes: v4 UUIDs are random, causing index fragmentation. This is why v7 was introduced — its timestamp prefix keeps inserts roughly in order, dramatically improving index write performance on large tables.

The Distributed Identity Problem: How UUIDs Were Born Out of Network Chaos

The conceptual ancestor of the UUID is the globally unique identifier devised for Apollo Computer's Network Computing System in the late 1980s, which needed a way to identify RPC interfaces without a central registry. The Open Software Foundation adapted this into the DCE (Distributed Computing Environment) UUID specification in the early 1990s, embedding MAC addresses and timestamps so that any machine on any network could mint an identifier guaranteed to be unique across space and time.

Microsoft adopted the scheme for COM and DCOM in the mid-1990s under the name GUID, and it became ubiquitous on Windows platforms. The modern RFC 4122 standard, published in 2005, formalised the format and defined versions 1 through 5. Version 4 — the pure-random variant that is dominant today — was partly motivated by privacy concerns after researchers demonstrated that v1 UUIDs could be used to identify and track the machine that generated them.

Version 7 was proposed in an IETF draft in 2021 and finalised in RFC 9562 in 2024, directly responding to the database-performance problems caused by random UUIDs as primary keys. The specification was driven by engineers at major cloud providers who had measured the real-world index fragmentation costs of v4 UUIDs at billions of rows. RFC 9562 also deprecated v1 and v2 for new applications, cementing v4 for privacy-sensitive contexts and v7 for time-ordered storage.

Advertisement