Tools

Generate Random UUIDs, GUIDs, ULIDs and NanoIDs

Click Generate to get a random UUID v4 (what Microsoft calls a GUID), or create up to 100 IDs at once. UUID v1, ULID and NanoID are available too.

All generation happens locally in your browser via the Web Crypto API. No IDs or text are ever sent to our servers.

What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit label defined in RFC 4122. With over 5 × 10³⁶ possible v4 values, the probability of generating the same UUID twice is astronomically small. UUIDs allow distributed systems to create unique identifiers — for database rows, API resources, session tokens — without a central counter or coordinator.

UUID v4 vs UUID v1 vs ULID vs NanoID

Choose the right identifier for your use case:

UUID v4 (128-bit random)

Completely random. The most widely used format, supported natively by all modern databases and languages. No temporal information. Generate with crypto.randomUUID().

UUID v1 (timestamp-based) Legacy

Encodes a timestamp for time-ordered sorting. Deprecated for new systems — the original spec exposes the MAC address, raising privacy concerns. Use ULID instead if you need sortability.

ULID (Universally Unique Lexicographically Sortable)

Lexicographically sortable by creation time — ideal as a database primary key with Prisma, Drizzle, or any ORM. 26-char Crockford Base32, URL-safe, case-insensitive.

NanoID (compact URL-safe ID)

Only 21 characters (vs 36 for UUID), URL-safe alphabet (A-Za-z0-9_-). Configurable length. Perfect for URL slugs, short tokens, and generated identifiers.

At-a-glance comparison of ID length and sort behavior across all four formats. UUID v4 36 chars UUID v1 36 chars ULID 26 chars · lexicographically sortable NanoID 21 chars
ULID and NanoID trade some UUID compatibility for shorter, more practical strings — ULID also sorts chronologically.

When to Use Each Identifier

Practical guidance for choosing the right ID format:

UUID v4 → Database Primary Keys

Use UUID v4 as primary keys in PostgreSQL (uuid type), MySQL (CHAR(36)), or any database that supports UUIDs natively. Supported by all major ORMs.

UUID v1 → Time-Ordered Log Files

Legacy systems that need timestamp-embedded IDs for log file naming or event ordering. Prefer ULID for new projects.

ULID → Sortable Primary Keys with ORMs

Use ULID when you need primary keys that sort by creation time without a separate timestamp column. Works out-of-the-box with Prisma, Drizzle ORM, and TypeORM.

NanoID → URL Shorteners & Compact Tokens

Use NanoID for URL slugs, short-lived tokens, and any context where compactness and URL-safety matter. Adjust length to balance collision probability and readability.

How to Generate a UUID

  1. Choose the identifier type
    Pick UUID v4 (random), UUID v1 (timestamp-based), ULID, or NanoID from the dropdown — each format suits different use cases.
  2. Set your options
    Choose how many identifiers to generate (up to 100 at once), switch between lowercase and uppercase, and adjust the NanoID length if needed.
  3. Generate in bulk
    Click Generate to create the whole batch in your browser — hit Regenerate any time for a fresh set.
  4. Copy the results
    Use Copy All to send every identifier to your clipboard, or select individual lines from the output box.

Frequently Asked Questions

Yes. GUID is Microsoft's name for a UUID: the same 128-bit identifier, written as 36 characters such as 550e8400-e29b-41d4-a716-446655440000. For .NET or SQL Server, generate a UUID v4 and switch to uppercase if your code expects it.

In theory yes, but the chance is negligible. UUID v4 has 122 random bits, about 5.3 × 10³⁶ possible values. For a 50% chance of a single collision you would need to generate around 2.7 × 10¹⁸ UUIDs.

Both are 128-bit identifiers. A UUID is written as 36 hex characters with dashes. A ULID is written as 26 Crockford Base32 characters and sorts by creation time, which makes it a modern alternative to UUID v1 that doesn't expose a MAC address.

Yes, it's widely used in distributed systems. The trade-off compared with sequential integers is index fragmentation in B-tree indexes. If insert order matters, consider a ULID, which sorts chronologically.