# UUID v7 is why I built a new generator

> Every UUID generator online defaults to v4. That was right in 2015 and wrong now. Here is why v7 is the modern default for database keys, plus the generator and public API I built for it.

Author: Nimoy Burrowes (https://nimoyburrowes.com/about)
Category: Guides
Published: 2026-07-18T05:00:00.000Z
Updated: 2026-07-22T04:33:01.890Z
Canonical: https://nimoyburrowes.com/blog/uuid-v7-generator-and-api

---

Every UUID generator I found online defaults to v4. That was correct in 2015. It is not correct anymore.

I built one that defaults to v7. It also does v1, v3, v4, and v5. Batch up to one thousand at once, download as TXT, CSV or JSON, generate SQL-ready INSERT rows or skip the UI and hit the public API from your terminal.

**Why v7 beats v4 for database keys**

UUID v4 is fully random. Every insert lands at a random spot in your B-tree index. Every insert forces a page split. Every insert amplifies I/O.

For a small table this does not matter. For a table with a hundred million rows, it is a big part of why your database is slow.

UUID v7 embeds a millisecond timestamp in the first forty-eight bits. Inserts land at the end of the index. Same uniqueness guarantees as v4, same distributed generation, but the write pattern of an auto-incrementing integer.

*If you are picking a UUID version for a new table today, pick v7.*

**When to still use v4**

- You explicitly do NOT want the ID to reveal when it was created. Public-facing IDs where creation order would leak user activity.- Your database or ORM does not yet support v7. Rare in 2026, but worth checking.

That is it. Anywhere else, v7 is the better default.

**The API**

Skip the UI entirely:

curl "https://nimoyburrowes.com/api/tools/uuid?count=100&v=7&text=1"

CORS is open, so it works from browser JavaScript too. The endpoint is stateless and does not log the values it returns.

**Try it**

[nimoyburrowes.com/tools/uuid-generator](https://nimoyburrowes.com/tools/uuid-generator)

## Frequently asked questions

### What is the difference between UUID and GUID?

Same thing. GUID is the name Microsoft uses. GUIDs are usually rendered in braces and often uppercase. The generator has both formats built in.

### Can UUIDs collide?

For v4 and v7, the collision probability is small enough that you could generate a billion UUIDs per second for a century and still be extremely unlikely to see one collision.

### Should I store UUIDs as text or binary?

Binary if your database supports it. The Postgres uuid type is 16 bytes; MySQL 8 has BIN_TO_UUID and UUID_TO_BIN for the same. Text storage doubles the size and slows index lookups.

### Is the API rate-limited?

Not currently. If it starts being abused, a per-IP rate limit will land. For heavy use, generate locally with the uuid npm package instead of hammering the endpoint.

### Does the API log the UUIDs it returns?

No. The route is stateless, cache-disabled and does not write the emitted values to any log. Each call generates fresh UUIDs and forgets them the moment the response is sent.

### Can I migrate an existing v4 table to v7?

For old rows, leave them alone or backfill v7-shaped IDs from each row's created_at timestamp (not from now). For new rows, switch your default to v7 and let the two versions coexist. The uniqueness guarantee is not affected.
