UUID / ULID Generator
Your data never leaves your browserGenerate RFC-4122 UUIDs (v4, v7, v1, v5) and ULIDs. Bulk generate up to 100. Runs 100% in your browser.
Share this tool
Found it useful? Help a fellow developer discover it.
UUID and ULID versions explained
122 random bits from a CSPRNG. No information about when or where it was generated. Use this as your default unless you have a specific need for ordering or determinism.
Encodes a Unix millisecond timestamp in the first 48 bits followed by random data. Because they sort lexicographically by creation time, v7 UUIDs are ideal for database primary keys. They cause far fewer B-tree page splits than v4.
Encodes a 60-bit timestamp (100ns intervals since Oct 1582) and a node ID (usually random). Sortable by creation time but less privacy-preserving than v7. Prefer v7 for new applications.
SHA-1 hash of a namespace UUID and a name string. The same inputs always produce the same UUID, which is useful for stable identifiers derived from external data (URLs, DNS names, email addresses).
Universally Unique Lexicographically Sortable Identifier. 48-bit millisecond timestamp + 80 random bits, encoded in Crockford Base32 (26 chars). URL-safe, case-insensitive, and lexicographically sortable. Compatible with UUID via conversion.
How to use the generator
- Select the ID type using the tabs at the top of the tool.
- Set the Count (1–100) to generate a batch. Click Generate (or press Ctrl+Enter) to produce a fresh set.
- Click any ID in the list to copy it individually. Use Copy All to copy every ID as newline-separated text.
- For UUID v5, select a namespace (DNS, URL, OID, X500, or a custom UUID) and enter the name to hash. The same inputs always produce the same UUID.
- Toggle Uppercase to switch between lowercase (database default) and uppercase formats.
UUID and ULID in databases and APIs
- Database primary keys. UUID v7 is the recommended choice for new tables. Its time-ordered prefix means consecutive inserts land at the end of the B-tree index rather than in random positions, dramatically reducing fragmentation and improving write throughput compared to v4.
- Distributed ID generation. Unlike auto-increment integers, UUIDs can be generated independently on any client or server without a central coordinator. This eliminates round-trips and makes IDs safe to create before the record is persisted.
- Idempotency tokens. Attach a UUID v4 to each API request so that retried calls due to network failures do not cause duplicate operations on the server. The server discards any request whose token it has already processed.
- Stable derived identifiers. UUID v5 produces the same UUID every time for the same input. Use it to create canonical identifiers from URLs, email addresses, or external record IDs without storing a mapping table.
- Request tracing. Attach a UUID to every incoming request and log it at each service boundary to trace a call across microservices, queues, and databases without a dedicated tracing library.
Frequently Asked Questions
How do I generate a UUID in JavaScript?
Modern browsers and Node.js 14.17+ expose crypto.randomUUID(), which returns a cryptographically random v4 UUID string. Example: const id = crypto.randomUUID(). For UUID v7 or ULID, use a library such as uuidv7 or ulid from npm. This tool is useful for generating IDs directly in the browser without writing or running any code.
What is the difference between a UUID and a ULID?
UUIDs are 128-bit identifiers displayed as 36-character hex strings with hyphens (for example, 550e8400-e29b-41d4-a716-446655440000). ULIDs encode the same 128 bits as 26-character Crockford Base32 strings. ULIDs are lexicographically sortable, URL-safe, case-insensitive, and more compact. Both are suitable for distributed ID generation, but ULID is naturally time-ordered and avoids hyphen separators.
Are the generated UUIDs truly unique?
UUID v4 has 122 bits of randomness, giving 2^122 possible values (~5.3 x 10^36). The probability of two random v4 UUIDs colliding is astronomically small. You would need to generate about 2.7 x 10^18 UUIDs before having a 50% chance of a single collision. In practice, UUID v4 collisions are treated as impossible.
When should I use UUID v7 instead of v4?
Use v7 when you use UUIDs as database primary keys. Because v7 encodes a timestamp in the leading bits, consecutive inserts produce sequential UUIDs, which means new rows land at the end of the B-tree index instead of in random positions. This dramatically reduces index fragmentation and improves insert throughput on large tables. For cache keys or idempotency tokens, v4 is fine.
What is the difference between a UUID and a GUID?
GUID (Globally Unique Identifier) is Microsoft's name for the same concept. The formats are identical. A GUID is a UUID, and vice versa. SQL Server, COM, and .NET use the term GUID. Most other systems use UUID.
What is UUID v5 used for?
UUID v5 is useful when you need a stable, reproducible identifier derived from external data. For example: a canonical UUID for a URL, a stable user ID derived from an email address, or deduplicated IDs for records ingested from a source system with its own string identifiers. Because the same inputs always produce the same UUID, you can recreate the identifier anywhere without storing a mapping table.
Why does ULID use Crockford Base32 instead of hex?
Crockford Base32 uses 32 characters (0-9 and A-Z, excluding I, L, O, and U to avoid ambiguity) and is case-insensitive. This produces a 26-character string that is shorter than a UUID's 36 characters (including hyphens), URL-safe, and unambiguously typeable. The excluded characters reduce transcription errors when reading IDs aloud or by hand.
Can I use these UUIDs in my production database?
Yes. The UUIDs are generated using the Web Crypto API (crypto.getRandomValues) for the random parts, which is a cryptographically secure pseudo-random number generator. Generation happens in your browser. Nothing is logged or stored on any server.
How do I convert a UUID to a ULID, or a ULID to a UUID?
A UUID and a ULID can encode the same 128 bits, just in different string formats: hyphenated hex for UUID, Crockford Base32 for ULID. Converting an existing ID between the two formats is a re-encoding, not something this generator does for IDs you already have. If you just need a valid ID in either format going forward, generate a fresh one here. If you need to preserve one specific existing value across both formats, that requires a short base32-to-hex conversion script rather than a generic online tool.
Can I see the timestamp embedded in a UUID v7 or ULID?
For any UUID v7 or ULID you generate on this page, the embedded timestamp is displayed next to the ID automatically. If you have an existing ID from elsewhere and want to decode it manually: a ULID stores a 48-bit millisecond timestamp in its first 10 Crockford Base32 characters, and a UUID v7 stores the same 48-bit millisecond timestamp in its first 48 bits, before the version nibble. UUID v1 is different. It embeds a 60-bit timestamp counted in 100-nanosecond intervals since October 15, 1582.
Related Tools
Hash Generator
Generate MD5, SHA-1, SHA-256, and SHA-512 hashes from any string.
Unix Timestamp Converter
Convert Unix timestamps to human-readable dates and vice versa.
Password Generator
Generate cryptographically secure passwords and EFF-style passphrases using the Web Crypto API.
QR Code Generator
Generate QR codes for URLs, text, WiFi credentials, emails, and vCards. Custom colors, PNG/SVG download.
From the Blog
UUID vs ULID vs NanoID. Which Unique ID Format Should You Use in 2026 and Why the Wrong Choice Hurts Your Database
A thorough comparison of UUID v4, UUID v7, ULID, and NanoID. Understand the database performance implications and pick the right format for your use case.
Read article