# 10,000 IDs per call in CSV or JSON: bulk for DB seeding

> Online UUID generator free: v4 (random), v7 (time-ordered RFC 9562), v5 (namespace), ULID, NanoID. Bulk up to 10,000 IDs per call, CSV or JSON export.

Free in-browser tool (no upload): https://www.mauriziofonte.it/tools/uuid-ulid-generator

Generate crypto-safe unique identifiers in every standard format: **UUID v4** (random RFC 4122), **UUID v7** (time-ordered RFC 9562, 2024), **UUID v5** (namespace + name SHA-1), **ULID** (timestamp + Crockford base32), **NanoID** (url-safe alphabet). Up to 10,000 IDs per call, CSV or JSON export.

## How to use the generator

1. **Pick the type** - UUID v4 for standard random. UUID v7 for time-ordered IDs (great as database primary keys, more efficient B-tree indexing than v4). UUID v5 for deterministic IDs from name (e.g. stable UUID per customer email). ULID for lexicographically sortable IDs. NanoID for URL-friendly tokens shorter than UUID.
2. **Set quantity** - Up to 10,000 per generation. For larger datasets a batch script works better (Python `uuid.uuid4()` in a loop).
3. **For UUID v5: namespace + name** - The namespace is a UUID identifying your application domain (DNS, URL, custom). The name is the string to hash. Result: same namespace + same name = always same UUID. Used for migrating legacy IDs to stable UUIDs.
4. **Export** - Copy all to clipboard, or download as CSV (with index column) or JSON array. Compatible with Postgres COPY, MySQL LOAD DATA, MongoDB insertMany.

## Which format to choose

**UUID v4** is the historical default. 122 bits of entropy, virtually impossible to collide (1 in 2^61 = 2.3 quintillion). Great for session IDs, API tokens, primary keys when ordering does not matter.

**UUID v7** (RFC 9562, May 2024) is a revolution for databases. It keeps the uniqueness of v4 but embeds an ms-precision timestamp as prefix. Result: chronologically nearby IDs have nearby values, the database B-tree does not fragment on INSERT, write throughput is +50-300% vs random v4. Adopt as primary key if your system was redesigned after 2024.

**ULID** is a UUID alternative with more compact encoding (26 chars vs 36 of UUID hex with dashes). Lexicographically sortable by timestamp. Crockford base32 avoids ambiguous characters (0/O, 1/I/L). Typical use: log line IDs, request IDs in distributed tracing.

**NanoID** is the minimal choice for URL-safe tokens. 21 default chars = 126 bits entropy (comparable to UUID). 64-char URL-safe alphabet (no escape needed in URLs). Use case: short URLs, password reset tokens, invite codes.

**UUID v5** is deterministic (namespace + name -> SHA-1 hash -> UUID). Same input always returns the same UUID. Use case: assigning a stable UUID to every record of a legacy auto-increment system, without modifying the database.

## Glossary

- **UUID**: Universally Unique Identifier, RFC 4122 (2005). 36-char string (32 hex + 4 dashes). Versions: v1 (mac+timestamp), v3 (md5), v4 (random), v5 (sha1), v6/v7/v8 (RFC 9562, 2024).
- **ULID**: Universally Unique Lexicographically Sortable Identifier. 26 chars Crockford base32. 48-bit timestamp + 80-bit random.
- **NanoID**: URL-safe token of comparable compactness to UUID. Default 21 chars, 64-char alphabet. Algorithm by Andrey Sitnik.
- **Crockford base32**: Doug Crockford's base32 encoding, 32 characters: digits 0-9 and letters A-Z except I, L, O and U, which are confused with 1 and 0 (and U avoids accidental obscenities). When reading, I and L count as 1, O as 0. Optimized for human readability and prevention of transcription errors.
- **WebCrypto**: W3C API for native cryptographic operations in the browser. `crypto.getRandomValues` for random bytes, `crypto.randomUUID` for native UUID v4 (browsers since 2022).
- **Time-ordered ID**: ID embedding a timestamp as prefix, ensuring chronologically generated IDs are lexicographically sortable. Main benefit: unfragmented B-tree index, increased write throughput.

## Frequently asked questions

### Is UUID v7 supported by modern databases?

Yes as strings (varchar/uuid type). PostgreSQL has a native UUID type that accepts v7 unmodified. MySQL 8 has BINARY(16) that works the same. SQLite TEXT. Many ORMs (Prisma 5+, Drizzle, TypeORM 0.3+) support v7 natively as default UUID. To migrate an existing v4 system to v7: change the default value, historical v4 IDs stay valid (UUID is append-only).

### Can I generate one million UUIDs with this tool?

Limit of 10,000 to avoid tab freeze. For larger datasets: `uuidgen` CLI (Linux/macOS), Python `[uuid.uuid4() for _ in range(1000000)]`, Node `require('crypto').randomUUID()` in a loop. They all produce identical-quality UUIDs (same CSPRNG).

### Practical difference between ULID and UUID v7?

Both time-ordered. ULID is more compact (26 chars vs 36) thanks to base32 instead of hex+dashes. UUID v7 is RFC standard, ULID is a younger de-facto spec (2016). For new systems: UUID v7 if you want the ratified standard, ULID if you want compactness and readability. Functionally equivalent.

### Is NanoID less secure than UUID?

Depends on size. NanoID 21 chars with 64-char alphabet = 126 bits entropy, equivalent to UUID v4 (122 bits). NanoID 8 chars = 48 bits, too low for globally unique IDs. The default (21 chars) is calibrated to give roughly the same uniqueness level as UUID, in 41% the characters. For URL-safe tokens it is the better choice.

### Does UUID v5 always produce the same UUID for (namespace, name)?

Yes, it is deterministic. SHA-1(namespace_bytes + name_bytes) -> first 16 bytes -> formatted as UUID. Use case: get stable UUIDs without a mapping table (e.g. UUID per customer email, per DNS domain, per REST resource).

### Does the tool generate UUIDs with cryptographically secure system?

Yes. All types use `crypto.getRandomValues()` which calls the operating system CSPRNG (/dev/urandom, CryptGenRandom, getrandom syscall). Same entropy quality as OpenSSL, libsodium, Python secrets.

### Can I export in custom format (e.g. SQL INSERT)?

Not directly. CSV and JSON are the two formats supported in V1. For SQL INSERT: copy the CSV, open in Excel/sed, build the VALUES list. Or Python script: `print(';'.join(f"INSERT INTO t (id) VALUES ('{u}');" for u in uuids))`.

### Is ULID case-sensitive?

No, Crockford base32 is case-insensitive: A==a, B==b, etc. The tool generates uppercase as standard, and a reader must accept a ULID in either case. This tool generates IDs, it does not decode them.

---
Tool by Maurizio Fonte, senior backend engineer. All tools: https://www.mauriziofonte.it/tools/
