UUID v4 Generator Online
Generate random UUID v4 values
Cómo usar UUID Generator
- 1
Click Generate
A new cryptographically random UUID v4 is created instantly.
- 2
Generate in bulk
Set the quantity to generate multiple UUIDs at once for test data.
- 3
Copy UUIDs
Click copy to grab one UUID or all generated UUIDs as a list.
Preguntas frecuentes
Is my data safe?
Are these UUIDs truly random?
What is the difference between dev/uuid and generate/uuid?
Can two generated UUIDs ever be the same?
Should I use UUID v4 or UUID v7 for database primary keys?
Saber más
¿Qué es UUID Generator?
Generate cryptographically random UUID v4 values instantly for use in databases, distributed systems, APIs, and automated tests. Create one at a time or generate dozens in bulk for test fixtures and seed data. Uses crypto.randomUUID() from the Web Crypto API — the same randomness source used in TLS handshakes. Outputs in the standard xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx format, ready to paste directly into SQL inserts, JSON payloads, or code. No server, no sign-up, no limits.
¿Por qué usar UUID Generator?
- Cryptographically secure — uses crypto.randomUUID() or crypto.getRandomValues(), not Math.random(), so UUIDs are suitable for use as secure identifiers.
- Bulk generation — create dozens of UUIDs at once for populating test fixtures, database seeds, or mock data sets.
- Developer-focused format — outputs in standard hyphenated format (8-4-4-4-12) ready for direct use in code.
- Instant — generation completes in microseconds. Copy and paste into your IDE without interrupting your workflow.
- Completely private — UUIDs are generated locally. No server logs your generated identifiers.
Casos de uso de UUID Generator
Database primary keys
Generate UUIDs to use as primary keys when inserting records into PostgreSQL, MySQL, or DynamoDB tables during development or testing.
Test fixture data
Create batches of unique UUIDs for populating test databases, mock API responses, or JSON fixture files used by automated test suites.
API request IDs
Generate unique request correlation IDs to include in API calls for tracing and debugging distributed system requests.
Idempotency keys
Create idempotency keys for payment APIs (Stripe, PayPal) to safely retry requests without risking duplicate charges.
Consejos y buenas prácticas
- 💡In PostgreSQL, use the uuid-ossp extension's uuid_generate_v4() or the built-in gen_random_uuid() for server-side UUID generation in production.
- 💡UUIDs are globally unique without coordination — no need for a central ID server. This makes them ideal for distributed systems and client-side ID generation.
- 💡For URL slugs or short identifiers, consider using only a portion of the UUID (e.g., the first 8 characters) or a dedicated short ID library instead.
- 💡Uppercase and lowercase UUID representations are equivalent — 'A3F4...' and 'a3f4...' are the same UUID. Most databases normalize to lowercase.
Cómo funciona
UUIDs are generated using crypto.randomUUID() where supported (Chrome 92+, Firefox 95+, Safari 15.4+), falling back to crypto.getRandomValues() for older browsers. The fallback manually constructs the UUID v4 format by generating 16 random bytes and setting bits 12-15 of byte 6 to 0100 (version 4) and bits 6-7 of byte 8 to 10 (variant 1), per RFC 4122. The result is formatted as the standard 8-4-4-4-12 hyphenated hex string. Collision probability is approximately 1 in 2^122, making collisions effectively impossible in any realistic use case.