UUID Generator
Generate UUID v4 (random) or v7 (timestamp-based) identifiers
UUID Version
Bulk Generate
About UUID v4
UUID v4 (Universally Unique Identifier version 4) is generated using random numbers. The probability of generating a duplicate is so low that it’s considered practically impossible. Format: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx where y is 8, 9, a, or b.
Frequently Asked Questions
What is the difference between UUID v4 and UUID v7?
UUID v4 is fully random except for a few version and variant bits, offering no ordering guarantees. UUID v7 embeds a millisecond-precision Unix timestamp in the most significant bits, making generated UUIDs monotonically sortable. v7 is preferred for database primary keys where you want time-ordering without needing a separate created_at column; v4 is better when you want no temporal information embedded.
How do I generate a UUID in the browser without installing anything?
Open this UUID Generator page, select v4 or v7, and click Generate New. A UUID appears instantly. Click Copy to put it on your clipboard. For multiple IDs at once, enter a count up to 1,000 and click Generate Bulk. All generation runs in the browser using the Web Crypto API’s getRandomValues, so no server call is made.
Are UUID v4 values cryptographically random and collision-safe?
Yes. The tool uses the browser’s crypto.getRandomValues API, which produces cryptographically strong random bytes. The theoretical probability of generating two identical v4 UUIDs is astronomically low — around 1 in 5.3 x 10^36. In practice, UUID v4 collisions are not a concern for any realistic application.
How do I generate UUIDs without hyphens or in uppercase for a specific database?
Use the Format selector in the Bulk Generate section. Options include Standard (lowercase with hyphens), UPPERCASE, No Hyphens, and {Braces}. Some databases and legacy systems require a specific format — MySQL often stores UUIDs without hyphens as a CHAR(32) for performance, while Windows COM GUIDs typically appear in brace format.
Can I use a UUID as a primary key in PostgreSQL or MySQL?
Yes, but with a performance caveat. UUID v4 keys are random, causing index fragmentation in B-tree indexes on large tables because new rows insert into random leaf positions. UUID v7 addresses this by being time-sortable, inserting in near-sequential order. PostgreSQL has a native uuid type; MySQL stores UUIDs as CHAR(36) or BINARY(16) depending on your schema design.