Random UUID Generator
Generate random UUIDs and GUIDs
Generate random UUIDs (Universally Unique Identifiers) and GUIDs instantly. Support for UUID versions 1, 4, and custom formats
Generate random UUIDs (Universally Unique Identifiers) and GUIDs instantly. Support for UUID versions 1, 4, and custom formats
UUIDs (Universally Unique Identifiers) are 128-bit identifiers used across software systems. Here's exactly how to generate and use them:
RFC 4122 defines five UUID versions, each optimized for different scenarios. Version 1 generates UUIDs from a timestamp and MAC address — the first 60 bits encode time (in 100-nanosecond intervals since October 15, 1582) and the next 48 bits encode the network interface MAC address. This makes Version 1 UUIDs globally unique but leaks hardware information. Version 4 generates UUIDs entirely from random numbers using cryptographically secure random sources — this is the most common choice for general identifiers because it provides maximum privacy with no predictable patterns. Version 7 (proposed in RFC 9562, widely adopted in 2023+) encodes a Unix timestamp in the first 48 bits followed by random data, making UUIDs sortable by creation time while maintaining uniqueness — ideal for database primary keys where sequential ordering improves B-tree index performance. Version 3 and 5 use MD5 and SHA-1 hashing respectively to create deterministic UUIDs from namespace identifiers and names — useful when you need reproducible identifiers (like generating the same UUID for the string 'users' table every time). Understanding these differences helps you choose the right version for your use case rather than defaulting blindly to Version 4.
We support Version 1 (time-based with MAC address), Version 4 (fully random), and Version 7 (time-sortable). Version 4 is the default and recommended for most use cases. Version 7 is ideal for database primary keys where sort order matters. Version 1 is useful when you need embedded creation timestamps.
UUID v4 has a 122-bit random component (6 bits are fixed for version/variant flags), giving 2^122 possible values. The probability of collision between two randomly generated UUIDs is approximately 1 in 5.3 × 10^36. Even generating 1 billion UUIDs per second for a century gives less than a 1 in a trillion chance of collision. For practical purposes, UUID collisions can be considered impossible.
UUIDs offer advantages: they're globally unique (no coordination needed across distributed systems), they don't reveal record count or sequence to external users, and they enable safe URL sharing without exposing internal IDs. However, integers are more storage-efficient, faster to index, and produce better B-tree locality. Modern best practice favors UUID v7 for new distributed systems, while legacy systems often stick with auto-increment integers for simplicity.
Yes! Toggle the 'Remove Hyphens' option to get compact 32-character hex strings like 550e8400e29b41d4a716446655440000 instead of the standard 36-character hyphenated form. Some APIs and database systems prefer the compact format.
Absolutely. crypto.randomUUID() uses the operating system's cryptographically secure pseudo-random number generator (CSPRNG), producing unpredictable values suitable for security-sensitive contexts. Math.random() uses a predictable algorithm — given enough outputs, an attacker could predict future values. Always use crypto.randomUUID() for session tokens, password reset codes, or any security-related identifier.
No. All generation happens entirely in your browser using JavaScript's crypto.randomUUID() API. No UUIDs are sent to any server, stored in cookies, or logged anywhere. Your generated identifiers remain completely private and ephemeral.