Skip to content

UUID Generator - Random UUID v4, v7 & ULID Generator

Generate UUIDs in bulk

Pick a type, set how many you need (1 to 100) and click Generate. v4 uses the browser's crypto.randomUUID(). v7 and ULID use the same Web Crypto random source plus the current time, and IDs in one batch stay in strict order even when several share a millisecond. Uppercase and No dashes change the UUID format; ULIDs are always uppercase. Copy one ID, or Copy All for a newline-separated list ready for a seed script or test fixture.

Decode an existing ID

Paste any UUID or ULID into the decoder to see its version, variant and, for time-based IDs, the date it was created. It also accepts urn:uuid: prefixes and braces, as in {550e8400-...}. For example, the v7 UUID 01a1c4ca-fdc0-7572-8fa2-20b2879db8cb decodes to 10 November 2026, 09:30:00 UTC: the first 12 hex digits, 01a1c4cafdc0, are that moment in milliseconds since 1970.

How the versions are laid out

  • v4: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx. Every x is random, y is 8, 9, a or b (the variant), and the 4 is the version.
  • v7: 48-bit Unix millisecond timestamp, then the version digit 7, then random bits. Values created later sort later, both as bytes and as strings.
  • ULID: the same timestamp-then-random idea in 26 base32 characters. A ULID converted to UUID form keeps its timestamp but does not carry a v7 version digit.

Do not use any of these as secrets such as password reset tokens. A v4 UUID is unguessable in practice, but a dedicated random token from the password generator makes the intent clearer and can be longer.

Related Tools

Frequently Asked Questions

What is a UUID?
A 128-bit identifier written as 32 hex digits in five dash-separated groups (8-4-4-4-12), defined by RFC 9562, which replaced RFC 4122 in 2024. The first digit of the third group is the version: 550e8400-e29b-41d4-a716-446655440000 is a version 4 UUID. Anyone can generate one without asking a central server, which is why they are used for database keys, request IDs and file names.
Should I use v4 or v7?
Use v7 for database primary keys. Its first 48 bits are a millisecond timestamp, so new IDs sort after old ones and inserts land at the end of a B-tree index instead of in random pages. Use v4 when the ID must reveal nothing, because anyone can read the creation time out of a v7 or ULID.
Can two generated UUIDs collide?
Not in practice. A v4 UUID has 122 random bits. You would need around 2.7 quintillion of them for a 50% chance of a single duplicate. v7 has 74 random bits per millisecond, which is still far more than any system generates. This page uses the Web Crypto API for its random numbers, not Math.random.
What is a ULID?
A ULID is a 48-bit millisecond timestamp plus 80 random bits, written as 26 Crockford base32 characters such as 01ARZ3NDEKTSV4RRFFQ69G5FAV. Like v7 it sorts by creation time. It is shorter than a dashed UUID, case-insensitive and leaves out the easily confused letters I, L, O and U. The decoder shows any ULID as the equivalent UUID, so you can store it in a native uuid column.
Can I get the creation time from a UUID?
Only for time-based versions. Paste a v1, v6 or v7 UUID, or a ULID, into the decoder and it shows the embedded date and time. A v4 UUID is fully random and has no timestamp.
With or without dashes?
Same value either way. The dashed form is the standard text representation, and PostgreSQL's uuid type, Python's uuid module and most libraries accept both. Storage size only matters if you keep UUIDs as text: a native uuid or BINARY(16) column takes 16 bytes, against 36 for the dashed string.