Skip to content
TheCalcUniverse

UUID v4 & ULID Generator — Generate Unique Identifiers

Generate random UUID v4 and ULID identifiers instantly. Bulk generate multiple IDs, copy to clipboard, and choose between UUID and ULID formats.

✓ Tested formula & cited sources Formula verified 2026-01-15 Runs in your browser — inputs never sent anywhere

See it worked out

Example — Number of IDs 5:

Generated IDs

57449b51-f54d-40b3-9ab1-7ead440938c0, b981417b-bd18-431a-a212-2ddbbb15c954, 599815fd-fd23-4502-9df6-720403b9c07e, e8c84889-5743-4206-be2e-b36df032efa4, 35ba003c-02f5-4984-8f53-474f999ccdb6

Number Generated

5

The formula

UUID v4 = 128-bit random ID (36 chars) | ULID = 26-char Crockford base32 (timestamp + random)

UUID v4
UUID Version 4
ULID
Universally Unique Lexicographically Sortable Identifier
Crockford Base32
Crockford Base32 Encoding
Collision
Identifier Collision

Worked example — Number of IDs 5

Generated IDs = 57449b51-f54d-40b3-9ab1-7ead440938c0, b981417b-bd18-431a-a212-2ddbbb15c954, 599815fd-fd23-4502-9df6-720403b9c07e, e8c84889-5743-4206-be2e-b36df032efa4, 35ba003c-02f5-4984-8f53-474f999ccdb6

Full explanation ↓

How UUID Generator Works

UUID v4 = 128-bit random ID (36 chars) | ULID = 26-char Crockford base32 (timestamp + random)

UUID v4 (Universally Unique Identifier version 4) generates a 128-bit random identifier displayed as 36 hexadecimal characters in the format 8-4-4-4-12. ULID (Universally Unique Lexicographically Sortable Identifier) is a 26-character Crockford base32-encoded identifier where the first 10 characters encode a 48-bit millisecond timestamp and the last 16 characters are random, making ULIDs time-sortable.

UUID v4
UUID Version 4A 128-bit randomly generated identifier with 122 bits of randomness and 6 fixed variant/version bits. 5.3 x 10^36 possible values.
ULID
Universally Unique Lexicographically Sortable IdentifierA 26-character Crockford base32 encoded identifier with a 48-bit timestamp prefix and 80-bit random suffix. Sortable by creation time.
Crockford Base32
Crockford Base32 EncodingAn encoding scheme using 32 unambiguous characters (0-9, A-Z excluding I, L, O, U) to represent 5 bits per character. Used by ULID for compact, URL-safe representation.
Collision
Identifier CollisionThe probability that two randomly generated identifiers are the same. UUID v4 collision probability is approximately 1 in 2^71 for 10^18 UUIDs generated.
UUID v4 generates random 128-bit identifiers; ULID combines timestamp prefix with random suffix for time-sortable IDs

How to Use

  1. Select the format: UUID v4, ULID, or Both to compare formats side by side.
  2. Enter the number of IDs to generate (1 to 50). Multiple IDs are separated by commas.
  3. Review the generated IDs and copy them for use in your application.
  4. UUID v4 IDs are fully random; ULIDs are prefixed with the current timestamp for time-sortable ordering.
  5. Generate multiple IDs in bulk for seeding databases or populating test data.

Quick Reference

UUID v4 Formatxxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx
ULID FormatTTTTTTTTTTRRRRRRRRRRRRRRRR (10T + 16R)
UUID v4 Entropy122 random bits (approx. 5.3 x 10^36 values)

Common Uses

  • Generating primary keys for database records that need to be unique across distributed systems.
  • Creating unique session identifiers and API tokens for web applications.
  • Generating order numbers and transaction IDs that need to be sortable by creation time (ULID).
  • Producing unique identifiers for microservices communication where centralized ID generation is impractical.
  • Populating test databases with realistic, unique identifier values for development and QA.

Understanding the Result

Universally Unique Identifiers (UUIDs) and ULIDs serve the critical purpose of generating unique identifiers without requiring a central authority. UUID v4 is purely random: each of its 122 random bits (out of 128 total) is independently generated, making collisions astronomically unlikely. The version (4) and variant bits are fixed at positions 13 and 17 respectively. ULID was designed as a modern alternative that brings time-sortability to unique IDs: the first 10 characters encode a 48-bit millisecond timestamp using Crockford Base32, allowing ULIDs to be lexicographically sorted by creation time. This makes ULIDs particularly useful for database indexing where B-tree performance benefits from insertion-time ordering. ULIDs use Crockford Base32 encoding which excludes ambiguous characters (I, L, O, U) for human readability and case-insensitive processing. Both UUID v4 and ULID are 128-bit identifiers, but ULID is more compact at 26 characters vs 36 characters for UUID v4. The timestamp prefix in ULID provides approximately 1 millisecond precision and will not overflow until the year 10889.

Frequently Asked Questions

When should I use UUID v4 vs ULID?
Use UUID v4 when you need purely random identifiers with no timing information, such as security tokens or when you want to avoid leaking creation times. Use ULID when you want time-sortable identifiers for database indexing — ULIDs maintain insertion order which improves B-tree performance in databases like PostgreSQL and MySQL.
How unique are UUID v4 and ULID in practice?
UUID v4 has 122 random bits, giving approximately 5.3 x 10^36 possible values. The chance of a collision after generating 10^18 UUIDs is about 1 in 2 x 10^15. ULID has 80 random bits (about 1.2 x 10^24 values per millisecond). For practical purposes, both are effectively unique, especially when combined with uniqueness constraints in your database.
Can ULIDs be decoded to extract the timestamp?
Yes, the first 10 characters of a ULID encode the creation timestamp in Crockford Base32. You can decode these characters to get the millisecond-precision Unix timestamp. This makes ULIDs self-documenting — you can tell when an ID was created without querying the database.
Why does ULID exclude certain characters from its alphabet?
ULID uses Crockford Base32 which intentionally excludes the letters I, L, O, and U to avoid confusion with digits 1, 0, and V. This makes ULIDs easier for humans to read, type, and communicate verbally without ambiguity.
Are ULIDs case-sensitive?
Crockford Base32 is case-insensitive: lowercase letters are normalized to uppercase during decoding. ULID generation typically uses uppercase, but the spec requires decoders to accept both cases. Unlike Base64, the encoding is designed to be transmitted and handled in the same way as uppercase strings.
Was this calculator helpful?
Cite this calculator

TheCalcUniverse. "UUID v4 & ULID Generator — Generate Unique Identifiers." TheCalcUniverse, 2026, https://thecalcuniverse.com/devtools/uuid-generator/. Accessed July 24, 2026.

Embed this calculator on your site

Free to embed. Paste this into any HTML page — it stays up to date automatically.

Open embed ↗

You may also like