UUID Generator
Bulk-generate UUID v4 with optional hyphens and case toggles.
Built on crypto.randomUUID(). Safe & RFC 4122 v4.
How to use
Purpose
Online UUID/GUID generator supporting UUID v1 (timestamp), v3/v5 (namespace-hashed), v4 (random — most common), v7 (sortable, RFC 9562 from 2024). Generates 1-10000 IDs at a time, with dashed/no-dash format and uppercase/lowercase output. GUID is Microsoft's name for the same UUID format. Common for database primary keys, distributed trace IDs, filenames, session tokens, and order numbers. All generation uses crypto.randomUUID.
Steps
- Pick version: v4 (random, default), v7 (sortable), v1 (with MAC, not recommended), v3/v5 (namespace)
- Count: 1 / 10 / 100 / 1000 / custom
- Format: standard 8-4-4-4-12 (with dashes) or compact 32-char (no dashes)
- Case: lowercase (default) or full uppercase
- Click Generate for instant output; bulk generation shows progress
- Copy all or copy individual IDs
- Export .txt or .csv for database import
- v3 / v5 require a namespace UUID + name string
FAQ
- Should I use UUID v4 or v7?
- v4 is fully random — most common, broadest compatibility, but bad as a database primary key (defeats clustered indexes on insert). v7 (RFC 9562, 2024) places a 48-bit ms timestamp in the front and random bits in the rest — UUIDs sort by time naturally, giving near auto-increment performance while staying globally unique. Use v7 for new projects.
- Is UUID the same as GUID?
- Same thing. GUID (Globally Unique Identifier) is the Microsoft name; UUID (Universally Unique Identifier) is the RFC standard. Format is identical: 8-4-4-4-12 hex chars (32 total). .NET / SQL Server docs say GUID; everyone else says UUID.
- Is v4 UUID actually unique? Could it collide?
- Theoretically possible, practically negligible. With 122 random bits, ~2.6 billion UUIDs give roughly 50% collision probability. In practice, treat as never-collide — assuming a cryptographically secure source (crypto.getRandomValues / crypto.randomUUID), never Math.random().
- UUID v1 contains MAC — privacy issue?
- Yes. v1's last 48 bits are the network MAC, leaking which machine generated it. A famous 1998 incident leaked Microsoft internal MAC addresses via Word documents. Modern libs may use random node IDs, but check the implementation. Externally exposed UUIDs: prefer v4 or v7, avoid v1.
- What are v3 and v5 for?
- Namespace-based deterministic UUIDs. Given the same namespace UUID and name string, they always produce the same UUID. v3 uses MD5, v5 uses SHA-1. Use case: deterministically map external IDs (emails, URLs) to UUIDs without storing a lookup. Prefer v5 (v3 uses MD5, no longer recommended).
Use cases
- Database primary keys: distributed systems cannot use auto-increment IDs; UUID v7 gives better insert performance
- Order or transaction IDs: avoid sequential exposure by using UUIDs for user-visible IDs
- Upload deduplication: rename files to UUID to avoid collisions and hide original names
- Distributed tracing: each request generates a trace_id passed through microservice calls
- Test data: bulk generate 1000 UUIDs to seed a database for perf testing
Use cases
Database primary keys (v7 recommended), order/transaction IDs, file privacy, distributed trace_id, test data. Backend, DBA, QA. v7 sortable output, bulk generation, multi-format export, and namespace UUIDs are the differentiators.