UUID Generator
Generate UUIDs in v1, v4, and v7 formats. Bulk generate and download as CSV. Runs entirely in your browser.
Runs entirely in your browser. Nothing is sent to our servers.
About this tool
A UUID (Universally Unique Identifier) is a 128-bit value typically displayed as 32 hex digits in five groups separated by hyphens. The probability of two randomly-generated v4 UUIDs colliding is astronomically small, which is why they're a popular choice for database primary keys, idempotency tokens, request IDs, and anywhere you'd otherwise reach for an auto-increment.
Which version should you use?
- v4 is what most people mean by "UUID" — 122 random bits with version and variant markers. Use it when you don't need ordering and want maximum randomness.
- v7 embeds a Unix millisecond timestamp in the high bits, so v7 UUIDs sort chronologically. Great for database keys where you want newer rows clustered together on disk, without the index fragmentation that v4 causes on B-tree indexes.
- v1 uses the current time plus a node ID (originally the MAC address). It's mostly historical now — v7 is the modern equivalent with better collision resistance and privacy.
- Nil UUID is all zeros. Useful as a sentinel value.
Where to store them in a database
In MySQL, store UUIDs as BINARY(16) if you can — it's 4× smaller
than CHAR(36) and indexes faster. Convert on insert/select with
UUID_TO_BIN() and BIN_TO_UUID(). Postgres has a
native uuid type that's already 16 bytes.
Frequently asked questions
- Are these UUIDs cryptographically secure?
- Yes for v4 and v7. Both use
crypto.getRandomValues()for the random portions, which is a CSPRNG in every modern browser. The v1 implementation here uses random bytes for the node ID instead of your real MAC address, which is the recommended privacy-preserving practice. - Can I trust v7 to sort correctly in my database?
- Yes — v7 puts a 48-bit millisecond timestamp at the start, so lexicographic ordering matches chronological ordering. UUIDs generated within the same millisecond are tie-broken by random bits, so concurrent inserts still get unique values.
- What's the maximum I can generate at once?
- 10,000 per click. Generation is fast (millions per second), but rendering that many lines into the textarea is the bottleneck. For larger batches, use the Download CSV button.
- Does the CSV download include anything besides the UUID?
- Just one UUID per line in a column named "uuid". This makes it easy to import directly into a database tool or spreadsheet for testing.
Last updated: May 17, 2026