UUID v7 Generator

Generate UUID version 7 identifiers — timestamp-prefixed and lexicographically sortable. Ideal for database primary keys.

Random, 128-bit, RFC 4122. Most widely used.

When to use which type

UUID v4

Purely random (RFC 4122). The most widely supported unique identifier format. Use when you need a standard UUID and sorting by creation time does not matter.

UUID v7

Time-ordered UUID (RFC 9562). The first 48 bits encode a millisecond timestamp, making IDs lexicographically sortable. Prefer over v4 for database primary keys — better index locality, fewer B-tree page splits.

ULID

26-character Crockford Base32 string: 10 chars timestamp + 16 chars randomness. Lexicographically sortable and URL-safe. A compact drop-in for UUID when a shorter, human-readable identifier is preferred.

NanoID

Configurable length and alphabet. Best for short tokens, session IDs, and slugs. The default 21-character length has the same collision probability as UUID v4.

Common Use Cases

  1. Database primary keys with time orderingUse UUID v7 as a PostgreSQL or MySQL primary key to get the global uniqueness of a UUID with the index-friendliness of an auto-increment integer.
  2. Event log IDsAssign UUID v7 values to events so that logs are naturally ordered by creation time without a separate timestamp column.
  3. Distributed system trace IDsGenerate UUID v7 trace IDs across distributed services. The timestamp prefix lets you sort and correlate trace spans chronologically.

Pro plan — coming soon

Save your history, create reusable presets, and share outputs with a link. One plan, all tools.

See what's planned →

Frequently Asked Questions

Related Tools