How to use the UUID generator
- Choose a type: UUID v4, UUID v7, ULID or NanoID.
- Set how many you need (1–1,000).
- Format them: uppercase, hyphens and braces for UUIDs; separated by lines or commas, quoted, or as a JSON array.
- Copy or download the list. Generate new creates a fresh batch.
- Inspect a UUID by pasting it into the box at the bottom.
IDs are generated in your browser only after the page loads, never on a server, so nobody else receives the same values.
How the formats work
UUID v4 is 128 bits: 122 random, 4 for the version (4) and 2 for the variant, written as 32 hex digits in groups of 8-4-4-4-12, such as 9f1c2e4a-7b3d-4c5e-8f6a-1b2c3d4e5f60. The third group always starts with 4.
UUID v7 replaces the first 48 bits with the Unix time in milliseconds, then adds version, variant and 74 random bits. IDs created later sort later. When you generate a batch, each ID is one millisecond apart so the list is strictly ordered.
ULID also starts with a 48-bit timestamp, followed by 80 random bits, written in Crockford Base32 (no I, L, O or U to avoid confusion).
NanoID draws characters uniformly from an alphabet using rejection sampling, so no character is more likely than another, which is a common bug in home-made ID generators.
Worked examples
Example 1: primary keys for a new table
Generate 10 UUID v7 values and look at the beginnings: they share a prefix because they were created at almost the same time. Databases such as PostgreSQL store them in the uuid type and keep the index compact.
Example 2: test fixtures
Generate 50 UUID v4 values as a JSON array and paste them into seed data. Quoted and comma-separated output also drops straight into SQL IN (…) lists.
Example 3: short public links
Choose NanoID with length 12 and an alphabet without look-alike characters, such as 23456789abcdefghjkmnpqrstuvwxyz. The check shows about 59 bits of randomness: fine for invite codes with rate limiting, too low for secret tokens.
Inspecting UUIDs
Paste any UUID to see its version and variant. For v7, and the older time-based v1 and v6, the creation time is decoded and shown in UTC. The nil UUID (all zeros) and the max UUID (all F) are recognised too.
Common mistakes
- Using
Math.random()for IDs. It isn’t cryptographically secure; this tool usescrypto.getRandomValues. - Storing UUIDs as text. A native
uuidor 16-byte binary column is smaller and faster than 36 characters. - Treating UUIDs as secrets. They’re unique, not secret; use dedicated random tokens for password resets.
- Mixing case inconsistently. UUIDs are case-insensitive, but string comparisons in code aren’t.