You Might Also Like
UUID Generator Online Free — UUID v4, v7, v1, ULID & NanoID
About this tool
Generate UUIDs, ULIDs, and NanoIDs Instantly — No Install, No Sign-Up
You need a unique ID. Maybe it's a primary key for a new database record, a correlation ID to thread through distributed service logs, a session token, or a share link slug. The format you choose matters — UUID v4 is the universal default, UUID v7 sorts cleanly in indexes, ULID packs the same uniqueness in a more readable format, and NanoID gives you short, URL-embeddable strings you can tune to any alphabet.
This tool covers all four. Pick the format from the tab bar, set a count, and click Generate. Each type uses the browser's Web Crypto API — specifically crypto.randomUUID() for UUID v4 and crypto.getRandomValues() for everything else. No server is involved and nothing is ever logged or stored.
UUID v4 is random — 122 bits of cryptographic entropy. The probability of two v4 UUIDs ever colliding is so small (1 in 5.3 × 10³⁶) that for any real-world system it is treated as zero. It is the right default for session tokens, file identifiers, and any context where you just need something globally unique.
UUID v7 trades some randomness for time-ordering. The first 48 bits are the Unix millisecond timestamp, making v7 UUIDs sort chronologically in standard byte order. This makes them significantly better as database primary keys than v4 — new records always insert at the end of the B-tree index rather than at a random position, eliminating the write amplification and page splits that UUID v4 causes at scale.
ULID goes a step further: it's 128 bits encoded in 26 Crockford Base32 characters (vs 36 for UUID with hyphens), lexicographically sortable, and has no hyphens — making it URL-safe out of the box. The 26-char format is easier to read, easier to copy, and still embeds a full millisecond timestamp in the first 10 characters.
NanoID is for when you need short IDs in public-facing contexts. The default 21-character output from a 64-character alphabet gives 126 bits of randomness — comparable to UUID v4 — but the string is shorter, URL-safe, and the alphabet is fully customizable. Use hex for log trace IDs, numbers-only for customer-facing order codes, or the default URL-safe alphabet for share links.
Features
- UUID v4 — 122-bit random UUID using
crypto.randomUUID(), the most widely supported and used format; generates at full cryptographic quality - UUID v7 — time-ordered UUID (RFC 9562); first 48 bits are Unix ms timestamp, remaining 74 bits random; sorts chronologically and avoids B-tree index fragmentation as a SQL-friendly primary key
- UUID v1 — timestamp-based UUID with random node ID (MAC address replaced with random bytes for privacy); 60-bit timestamp in 100-ns intervals since 1582
- ULID — 26-char Crockford Base32; 48-bit timestamp prefix + 80-bit random; lexicographically sortable, URL-safe, no hyphens; pairs well with hash-based auth tokens
- NanoID — configurable alphabet and length; 6 built-in presets (URL-safe, alphanumeric, lowercase+digits, uppercase+digits, hex, numbers); custom alphabet input for fully bespoke IDs
- Bulk generation: 1 to 1000 IDs in one click with quick-count buttons (1 / 5 / 10 / 50 / 100) and a free-entry count input
- Uppercase / lowercase toggle for UUIDs and ULIDs — some databases and logging systems normalise to uppercase; match your system's convention
- No-hyphens mode for UUIDs — strips the 4 hyphens from the standard format, producing a compact 32-character hex string for use in URLs, filenames, or columns with character limits
- Click any ID to copy it individually — copy button appears on hover; confirmation tick fades after 1.5 s
- Copy All — copies the full list to clipboard as newline-separated values; paste directly into a spreadsheet, migration script, or seed file
- Download as
.txt— saves the list to disk; use with the Diff Checker to compare two batches or verify deduplication - 100% client-side via Web Crypto API — no server, no logging, no network requests; safe for sensitive tokens and private identifiers
How to Use
Generating IDs: Select the ID type from the tab bar at the top — UUID v4, UUID v7, UUID v1, ULID, or NanoID. Set the count using the quick buttons (1, 5, 10, 50, 100) or type a custom number up to 1000. Click Generate and the list appears instantly.
Copying IDs: Click any ID row to copy that one ID. Click Copy All in the footer to copy the entire list as newline-separated text — paste directly into a SQL INSERT statement, a seed script, or a spreadsheet.
UUID options: With UUID v4, v7, or v1 selected, the Uppercase toggle converts all hex characters to uppercase. No hyphens removes the four dashes from the standard format, producing a compact 32-character string. Both options can be combined.
ULID options: ULIDs are uppercase by default (Crockford Base32 spec). Toggle Lowercase if your system normalises identifiers to lowercase.
NanoID options: Set the Length (1–255 characters; default 21). Choose an Alphabet preset from the dropdown or type a custom alphabet in the input. The alphabet can be any Unicode string — the generator uses rejection sampling to ensure uniform distribution even with non-power-of-2 alphabet sizes.
Downloading: Click Download to save the generated list as a .txt file named after the ID type (e.g. v4-ids.txt, ulid-ids.txt). The file contains one ID per line, ready to load into scripts or databases.
Common Use Cases
crypto.randomUUID() are cryptographically random and suitable for session identifiers, CSRF tokens, email verification links, and password reset codes. For shorter codes, NanoID with a numbers-only alphabet of length 8–10 produces human-readable one-time codes.Frequently Asked Questions
UUID v4 is fully random — 122 bits of crypto entropy. UUID v7 embeds a 48-bit millisecond timestamp in the first bytes, making v7 UUIDs sort chronologically. For database primary keys, v7 is better: it prevents B-tree index fragmentation because new records always insert at the "right end" of the index, not at random positions.
ULID is a 26-char Crockford Base32 identifier with a 48-bit timestamp prefix and 80-bit random suffix. It sorts lexicographically by creation time (like UUID v7), but the encoded string is shorter (26 vs 36 chars), has no hyphens, and is URL-safe by default.
Use NanoID when you need short, URL-embeddable IDs — share links, invite codes, public slugs. The default 21-char NanoID has 126 bits of randomness (comparable to UUID v4) but is shorter and fully configurable. Use UUID when you need a standard format that other systems (databases, SDKs) recognise.
In practice, UUID v4 collisions are impossible. With 122 bits of randomness (2¹²² ≈ 5.3 × 10³⁶ possibilities), you would need to generate 2.7 × 10¹⁸ UUIDs for even a 50% chance of a single collision — far beyond any real-world system.
It removes the four hyphens from the standard UUID format (xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx), producing a compact 32-character hex string. Both forms encode the same value — you can add hyphens back at positions 8, 12, 16, and 20.
UUID v1 embeds a 60-bit timestamp and a 48-bit node ID (originally the MAC address). The MAC address exposure was a privacy concern. UUID v7 supersedes v1 for time-based use cases — v7 is sortable in standard byte order and uses random bytes instead of the MAC address.
Yes, but choose v7 or ULID over v4 for performance. UUID v4 causes B-tree index fragmentation at scale because random IDs insert at random positions. UUID v7 and ULID are time-ordered, so new rows always append to the end of the index — similar to auto-increment IDs.
The default URL-safe alphabet (A–Z, a–z, 0–9, -, _) is the best general-purpose choice — 64 chars, 6 bits per character, URL-safe. Use hex (0–9, a–f) for trace IDs in logs. Use numbers-only for human-readable codes. Use alphanumeric if you want to avoid hyphens and underscores.
No. All generation uses the browser's Web Crypto API (crypto.randomUUID and crypto.getRandomValues). Nothing leaves your browser — no IDs are logged, stored, or transmitted. Safe to use for session tokens and private identifiers.
GUID (Globally Unique Identifier) is Microsoft's name for UUID. They are the same 128-bit identifier format defined in RFC 4122. GUIDs generated by Windows and .NET are typically UUID v4. The terms are interchangeable — the standard is UUID, but GUID is widely used in Windows, .NET, SQL Server, and COM contexts.