UUID Generator Online Free — UUID v4, v7, v1, ULID & NanoID
What's included
Features
crypto.randomUUID(), the most widely supported and used format; generates at full cryptographic quality.txt — saves the list to disk; use with the Diff Checker to compare two batches or verify deduplicationAbout 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.
Step by step
How to Use
- 1Select the ID formatClick the type tab at the top of the tool: UUID v4 (fully random, most widely used), UUID v7 (time-ordered, great for database primary keys), UUID v1 (timestamp-based with random node), ULID (26-char Crockford Base32, lexicographically sortable), or NanoID (short, URL-safe, configurable alphabet and length). Each format is explained in the badge under its label.
- 2Set the count and format optionsUse the quick-count buttons (1, 5, 10, 50, 100) or type any custom number up to 1000 in the count input. For UUID v4/v7/v1, toggle Uppercase to get hex chars in uppercase, or No hyphens to produce a compact 32-character string. For ULID, toggle Lowercase if your system normalises identifiers. For NanoID, set the Length (1–255) and choose an Alphabet preset or type a custom alphabet.
- 3Click GenerateClick the Generate button and the full list of IDs appears instantly. All generation happens in your browser using
crypto.randomUUID()andcrypto.getRandomValues()— no server requests are made and nothing is logged or stored. Regenerate as many times as needed. - 4Copy individual IDs or the full listClick any ID row in the list and a Copy button appears — click it to copy that single ID. Click Copy All in the footer to copy the entire list as newline-separated text, ready to paste into a SQL
INSERTstatement, a seed file, a spreadsheet, or a fixture JSON file. - 5Download as a text fileClick Download in the footer to save the generated list as a
.txtfile named after the ID type (v4-ids.txt,ulid-ids.txt, etc.). The file contains one ID per line, ready to load into migration scripts, database seed tools, or test data generators. Click Clear to discard the current list and start fresh.
Real-world uses
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.Got questions?
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.