Security Tool

UUID Generator — v4, v1, ULID, NanoID

Generate UUIDs (Universally Unique Identifiers) in multiple formats: UUID v4 (random), UUID v1 (timestamp-based), and NanoID. Bulk generate up to 100 at once. Output as standard, no-hyphens, uppercase, or braces format. Runs in your browser.

crypto.randomUUID() Cryptographically random Multiple formats Bulk up to 100

Pro — UUID v5 (namespace), ULID, bulk 10,000+, API access

API access · Priority queue · Team workspace

Upgrade — $19/mo

How It Works

STEP 1

Choose Type & Count

Select UUID v4 (fully random, the most common type for database primary keys and session IDs), UUID v1 (encodes the current timestamp plus random node data, allowing chronological sorting), or NanoID (a shorter URL-safe random identifier using 21 characters by default). Enter a count from 1 to 100 and choose an output format from the dropdown.

STEP 2

Click Generate

UUIDs are generated using the browser's cryptographically secure random number generator — crypto.randomUUID() for v4 (available in all modern browsers since 2021) and crypto.getRandomValues() for the v1 time+random hybrid and NanoID. All UUIDs meet RFC 4122 specification. UUID v4 format is xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx where y is 8, 9, a, or b.

STEP 3

Copy or Download

Click Copy next to any individual UUID to copy it to clipboard, or click Copy All to copy all generated UUIDs at once (newline-separated). Download saves all UUIDs as a plain text file — one per line — ready to import into a spreadsheet, seed script, or test fixture. Select your output format (standard, uppercase, no hyphens, braces, or URN) before copying or downloading.

UUID Generator Features

UUID v4 — Random

UUID v4 uses 122 bits of cryptographically random data (the remaining bits are version and variant flags). The probability of generating a duplicate in 1 billion UUIDs is approximately 1 in 2.71 × 10¹⁸ — effectively zero for any practical application. v4 is the recommended UUID version for database primary keys, session tokens, file identifiers, and any context where you need globally unique IDs without coordination between systems.

UUID v1 — Timestamp

UUID v1 encodes a 60-bit timestamp (100-nanosecond intervals since October 1582), a clock sequence for monotonicity, and random node data. The timestamp makes v1 UUIDs sortable by generation time. However, v1 UUIDs reveal the generation timestamp — a potential privacy concern. The node component in this browser-based generator uses cryptographically random bytes instead of a MAC address, avoiding MAC address exposure.

NanoID — Compact IDs

NanoID generates URL-safe random identifiers using a 64-character alphabet (A-Za-z0-9_-). At 21 characters, NanoID provides the same collision probability as UUID v4 (128 bits of entropy) but is 36% shorter. NanoID identifiers contain no hyphens, making them safe for use in URLs, filenames, CSS class names, HTML ids, and database columns where hyphens may cause parsing issues.

5 Output Formats

Standard lowercase with hyphens (550e8400-e29b-41d4-a716-446655440000), UPPERCASE (550E8400-...), no hyphens (550e8400e29b41d4a716446655440000) for databases that store UUIDs as 32-char strings, braces format ({550e8400-...}) for Windows GUID contexts, and URN format (urn:uuid:550e8400-...) for XML and RDF contexts.

Bulk Generation

Generate 1 to 100 UUIDs in a single click. Each UUID is listed with its own Copy button. Click Copy All to copy all UUIDs as newline-separated text for pasting into spreadsheets, seed files, or test fixtures. Download saves all UUIDs as a plain text file. Useful for pre-populating test databases, generating ID lists for load testing, creating seed data for development environments.

Cryptographically Secure

UUID v4 uses crypto.randomUUID() which is backed by the operating system's CSPRNG (same source as /dev/urandom on Linux and CryptGenRandom on Windows). NanoID uses crypto.getRandomValues() with rejection sampling to eliminate modulo bias. Both are safe for security-sensitive ID generation — session tokens, file upload keys, API keys, and password reset tokens.

Free vs Pro

FeatureFreePro
UUID v4, v1, NanoID
5 output formats, bulk 100
UUID v5 (namespace + name)
ULID (sortable UUID alternative)
Bulk 10,000+ UUIDs
REST API access

Frequently Asked Questions

A UUID (Universally Unique Identifier, also called GUID on Windows) is a 128-bit identifier defined in RFC 4122. It is designed to be unique across all systems without coordination — any computer can generate one and be statistically certain it has never been generated before. Use UUIDs for database primary keys (to avoid sequential ID enumeration), session tokens, file upload identifiers, job queue IDs, distributed system event IDs, and any context where uniqueness must be guaranteed across multiple systems or time periods.

UUID v4 is fully random (122 random bits) — two consecutive v4 UUIDs look completely unrelated and cannot be sorted chronologically. UUID v1 encodes the current timestamp (60-bit, 100-nanosecond precision) plus a clock sequence and node identifier. This makes v1 UUIDs roughly sortable by creation time. Use v4 when you need maximum randomness and privacy; use v1 (or its privacy-preserving alternative, ULID) when you need time-ordered IDs for database clustering performance.

In theory, yes — in practice, essentially never. UUID v4 has 2¹²² possible values (approximately 5.3 × 10³⁶). Generating 1 billion UUIDs per second for 100 years would yield roughly 3.15 × 10¹⁸ UUIDs — the probability of any collision in that set is approximately 1 in 10¹⁸. For virtually all applications, UUID v4 collision probability is so low it can be treated as impossible. If you need guaranteed uniqueness in a distributed system, use a database sequence or a coordination service alongside UUIDs.

NanoID is a compact random identifier library that generates URL-safe IDs using a 64-character alphabet. At 21 characters, a NanoID has the same collision probability as UUID v4 but is 36% shorter and contains no hyphens. Use NanoID instead of UUID when: the ID will appear in URLs (shorter is better), hyphens would cause parsing issues (CSS class names, HTML ids, filenames on some systems), or you need human-readable IDs that are easier to select and copy from UI elements.

PostgreSQL has a native UUID type that stores UUIDs as 16-byte binary internally while accepting and displaying them as standard 36-character strings — use the UUID type. MySQL has no native UUID type; store as CHAR(36) for human-readable format or BINARY(16) for performance (use UNHEX(REPLACE(uuid(),'-','')) to store). SQLite stores UUIDs as TEXT. For high-performance primary keys in MySQL/MariaDB, consider UUID v7 (not yet widely implemented) or ULID, which sort naturally and cause less index fragmentation than random UUIDs.

Yes — UUID v4 uses crypto.randomUUID(), a browser API backed by the operating system's cryptographically secure pseudorandom number generator (CSPRNG). NanoID uses crypto.getRandomValues() with rejection sampling to avoid modulo bias. Both produce UUIDs that are suitable for security-sensitive use cases. These are not Math.random()-based generators — they use the same entropy source as SSL/TLS key generation.