UUID / NanoID Generator
Generate UUID v4 instantly using Web Crypto API. Bulk generation for Pro users.
UUID v4
00b042d5-b679-46ce-9b15-b58eb690bafeBulk Generation (5 max on Free)
NanoID
UpgMdnH99nvOGw9_96JAjUUID v1 Timestamp Decoder
What Is a UUID?
A UUID (Universally Unique Identifier) is a 128-bit identifier standardized by RFC 4122. UUIDs are designed to be globally unique without requiring a central registration authority. They are represented as 32 hexadecimal digits displayed in five groups separated by hyphens: xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx, where M indicates the version and N indicates the variant.
UUID v4, the most widely used version, is generated using random or pseudo-random numbers. With 122 random bits, the probability of generating duplicate UUIDs is astronomically low — you would need to generate 2.71×10¹⁸ UUIDs to have a 50% chance of a collision. This makes UUID v4 ideal for database primary keys, session identifiers, file names, and distributed system identifiers.
UUID v1 encodes the current timestamp and the generator’s MAC address. While this guarantees uniqueness, it can leak information about when and where the UUID was created. Our tool includes a v1 timestamp decoder that extracts the embedded creation time from any UUID v1.
NanoID is a modern, URL-safe alternative to UUID. At 21 characters (vs UUID’s 36), NanoIDs are shorter while maintaining similar collision resistance. They use a custom alphabet and the Web Crypto API for secure random generation, making them popular in frontend applications and URL shorteners.
How to Use This Generator
- Single UUID — Click “Generate” in the UUID v4 section to create a single random UUID. Click the copy icon to copy it.
- Bulk Generation — Set the desired count and click “Generate” in the Bulk section. Free users can generate up to 5 at once; Pro users up to 1,000.
- NanoID — Click “Generate” to create a compact, URL-safe NanoID.
- v1 Timestamp Decoder — Paste a UUID v1 to extract its embedded timestamp.
All generation uses the browser’s crypto.randomUUID() and crypto.getRandomValues() APIs for cryptographically secure randomness.
Frequently Asked Questions
Are UUIDs truly unique?
In practice, yes. UUID v4 has 122 random bits, yielding 5.3×10³⁶ possible values. The probability of a collision is negligible for any real-world application — you would need to generate over 2.71 quintillion UUIDs before reaching a 50% chance of a single collision.
Should I use UUID or NanoID?
Use UUID when interoperability matters (databases, APIs, enterprise systems, standards compliance). Use NanoID when compactness matters for URLs, frontend IDs, or IoT. Both provide equivalent uniqueness guarantees at their respective sizes. NanoID's 21 characters vs UUID's 36 can matter in high-volume URL generation.
Can I use UUIDs as database primary keys?
Yes, but consider performance. UUID v4's randomness causes B-tree index fragmentation in databases like PostgreSQL and MySQL because each new UUID inserts at a random position in the index. UUID v7 (time-ordered) or ULID are better choices for database primary keys. For PostgreSQL, use the native uuid column type for efficient storage.
Are the generated UUIDs cryptographically secure?
Yes. Our generator uses the Web Crypto API (crypto.randomUUID() and crypto.getRandomValues()), which provides cryptographically secure pseudo-random number generation (CSPRNG). This is the same entropy source used by TLS key generation.
What is the difference between UUID v1, v4, and v7?
UUID v1 encodes the current timestamp and MAC address — unique but leaks device information. UUID v4 is randomly generated — most widely used. UUID v7 (draft RFC) uses a millisecond-precision timestamp prefix followed by random bits — time-ordered for better database index performance while maintaining randomness. Our tool generates v4.
What is a ULID?
A ULID (Universally Unique Lexicographically Sortable Identifier) is a 26-character base32-encoded identifier with a 48-bit millisecond timestamp prefix. ULIDs are sortable, URL-safe, and case-insensitive — making them excellent for distributed systems that need ordered, unique identifiers without a central sequence generator.
What is NanoID and how does it compare to UUID?
NanoID is a modern, compact, URL-safe identifier generator. At 21 characters (vs UUID's 36) using a 64-character alphabet, NanoID achieves similar collision resistance to UUID v4 while being significantly shorter. It uses the Web Crypto API for secure generation. Popular in frontend frameworks and URL shorteners.
Can UUID v1 expose my MAC address?
Yes. UUID v1 encodes the generating machine's MAC address in the last 12 hex digits. This is a known privacy concern. If your UUID v1 is generated on a machine with a network interface, that MAC address is embedded in every UUID. Our v1 decoder can extract and display this information. Avoid UUID v1 in privacy-sensitive contexts.
How do I generate UUIDs in bulk for database seeding?
Use our Bulk UUID Generator (Pro feature) to generate up to 1,000 UUIDs at once in a format ready for SQL INSERT statements or CSV import. The bulk generator uses the same CSPRNG as the single UUID generator, ensuring each generated UUID is independently random.