UUID / ULID Generator

Your data never leaves your browser

Generate RFC-4122 UUIDs (v4, v7, v1, v5) and ULIDs. Bulk generate up to 100. Runs 100% in your browser.

Loading…
Ctrl+EnterGenerateCtrl+Shift+CCopy AllCtrl+DDownloadClick any ID to copy it

Share this tool

Found it useful? Help a fellow developer discover it.

https://developertoolkit.dev/tools/uuid-generator

UUID and ULID versions explained

UUID v4Random · most common

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.

UUID v7Time-ordered · modern

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.

UUID v1Time-based · legacy

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.

UUID v5Name-based · deterministic

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).

ULIDSortable · 26 chars · Crockford Base32

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

  1. Select the ID type using the tabs at the top of the tool.
  2. Set the Count (1–100) to generate a batch. Click Generate (or press Ctrl+Enter) to produce a fresh set.
  3. Click any ID in the list to copy it individually. Use Copy All to copy every ID as newline-separated text.
  4. 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.
  5. Toggle Uppercase to switch between lowercase (database default) and uppercase formats.

UUID and ULID in databases and APIs

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.

Related Tools