Skip to content
BassoHub
Tools

UUID generator

Generate UUID v4, UUID v7, ULID and NanoID in your browser, one or up to 1,000 at once, and validate any UUID to see its version, variant and timestamp.

UUID, ULID and NanoID generator

Identifier type

The most common one: 122 random bits, no ordering at all. Fits almost any case where you just need a unique ID.

From 1 to 1,000 at a time.

Format

The standard (RFC 9562) form is lowercase with hyphens; UUID parsers accept either case.

Validate and inspect

Paste a UUID (any version, with or without hyphens, braces or urn:uuid:) or a ULID to see what it carries. Paste several, one per line, and the tool checks the whole list.

To check a list, paste one per line (you can paste straight from JSON, SQL or a spreadsheet).

Everything runs in your browser: nothing you generate or type is sent or stored. Values come from your device's cryptographic generator (crypto.getRandomValues).

What is a UUID

A UUID (Universally Unique Identifier, also called GUID in the Microsoft world) is a 128-bit number used as a unique identifier without a central authority handing out numbers. It is usually written as 32 hexadecimal digits split by hyphens in an 8-4-4-4-12 layout, such as 017f22e2-79b0-7cc3-98c4-dc0c0c07398f. The current specification is RFC 9562 (2024), which replaced the old RFC 4122 and introduced versions 6, 7 and 8.

Databases, APIs, message queues and offline-first apps use UUIDs to create IDs anywhere (on the server, on a phone, on many servers at once) without asking anyone and without colliding in practice.

How to use the generator

  1. Pick the type: UUID v4, UUID v7, ULID or NanoID.
  2. Set how many you need (1 to 1,000). For a single one, the value is shown large with a Copy button.
  3. Adjust the format: uppercase and hyphens (UUID), uppercase (ULID), size and alphabet (NanoID).
  4. In bulk, choose the list format (one per line, JSON, or quoted, ready to paste into an SQL IN (...)) and use Copy all or Download.
  5. To check an identifier you already have, paste it into the validator: it shows the version, the variant, the embedded time (v1, v6, v7 and ULID) and the same value converted between UUID and ULID.

v4, v7, ULID or NanoID: which one?

  • UUID v4 (36 characters; time-ordered: no): generic unique IDs, internal tokens, file names.
  • UUID v7 (36 characters; time-ordered: yes): database primary keys, events, logs.
  • ULID (26 characters; time-ordered: yes): time ordering with a shorter, more readable string.
  • NanoID (21 characters, adjustable; time-ordered: no): IDs in URLs, short links, public codes.
  • UUID v4 has 122 random bits. It is the most compatible: every language and database understands it.
  • UUID v7 starts with the Unix time in milliseconds (48 bits) followed by random bits. Since new IDs always sort after older ones, rows land at the end of the database index.
  • ULID stores the same 128 bits (48 of time + 80 random) in 26 Crockford base32 characters, an alphabet without I, L, O and U to avoid confusion with 1 and 0.
  • NanoID is a short ID format with a URL-safe alphabet. 21 characters from 64 symbols give 126 bits, nearly the same as UUID v4.

Why UUID v7 is better for databases

B-tree indexes (the default in PostgreSQL, MySQL and SQL Server) work best when new values arrive in order. With UUID v4 every insert lands at a random spot in the index: more pages touched, more fragmentation and a less effective cache on large tables. With UUID v7 (or ULID) inserts go to the end, like an auto-increment ID, while you keep the benefit of generating IDs outside the database.

The trade-off: the creation time is visible inside the ID. If that is sensitive (for example, revealing when an account was created), use v4 for publicly exposed IDs.

Collisions: can it repeat?

It can, but the odds are so low that in practice it doesn't happen. By the birthday paradox, to reach a 1% chance of a single repeat among UUID v4 values you would need to generate about 3.3 × 10¹⁷ of them (330 quadrillion). With UUID v7 and ULID a collision is only possible between IDs created in the same millisecond, and even then there are 74 or 80 random bits per millisecond.

What actually causes repeats is a bad generator: Math.random(), a fixed seed, or cloned virtual machines sharing the same state. This tool uses crypto.getRandomValues, the browser's cryptographic generator.

How the tool works

  • Everything runs in your browser. No generated ID and nothing pasted into the validator is sent or stored.
  • v7: follows method 1 of RFC 9562, with a 42-bit counter that restarts at a random value every millisecond. Even with 1,000 IDs in the same millisecond, each one sorts after the previous one.
  • ULID: within the same millisecond the random part is incremented, as the spec requires.
  • NanoID: characters are drawn by rejection sampling (no modulo), so every symbol in the alphabet has exactly the same chance.

FAQ

Are UUID and GUID the same thing? Yes. GUID is Microsoft's name for it; the format is the same. Old GUIDs may use the "Microsoft" variant, which the validator detects.

Uppercase or lowercase? The RFC recommends generating lowercase, and parsers must accept both.

Can I store it without hyphens? Yes. Even better: in PostgreSQL use the uuid type (16 bytes) instead of text.

Can I tell when a UUID was created? Only for versions with a timestamp (v1, v6, v7) and for ULIDs. The validator shows the date in UTC and in your time zone. A UUID v4 carries no time at all.

Does NanoID replace UUID? For IDs in URLs and short codes, yes. For database columns already typed as uuid or for integrations between systems, UUID is still the most widely accepted format.