UUID generator · Guide
UUID v7 Character Length: Same 36 Characters as Any UUID
A frequent assumption is that a timestamped UUID must be longer. It is not: v7 is the same 128 bits as every other version, with the bits allocated differently.
The size
128 bits, 16 bytes, 32 hex characters, 36 in canonical form with hyphens. Identical to v1, v4 and v5 — the version affects the contents, never the length.
This means v7 drops into any existing UUID column with no migration. A uuid column in PostgreSQL, BINARY(16) in MySQL or uniqueidentifier in SQL Server accepts it unchanged.
How the bits are spent
48 bits of Unix milliseconds, 4 bits of version, 12 random bits, 2 variant bits, and 62 more random bits — 74 random in total against v4's 122.
The reduction does not weaken uniqueness meaningfully, because the timestamp partitions the space: collisions are only possible between ids generated in the same millisecond.
0191a2b3-c4d5-7abc-8def-0123456789ab
\______________/ ^^^^ \____________/
48-bit ms ver 74 random bits totalStoring it
Use the native type where one exists — 16 bytes rather than 36. CHAR(36) is the portable fallback; VARCHAR(255) is never right for a fixed-length value.
v7 also compresses better than v4 in practice: consecutive ids share a timestamp prefix, so columnar stores and page compression get more out of them than they do from random values.
Shorter representations
Base64 gives 22 characters without padding, Base32 gives 26, and base58 around 22 — all the same 128 bits in a denser alphabet. Useful when the id appears in a URL and length matters.
ULID is the notable alternative: identical 128-bit content with a 26-character Crockford Base32 encoding that is case-insensitive and avoids easily confused characters.
Frequently asked questions
Is UUID v7 longer than v4?
No. Both are 128 bits and 36 characters in canonical form.
Can I store v7 in an existing UUID column?
Yes, with no migration — the format is unchanged.
How many random bits does v7 have?
74, compared with 122 in v4, since 48 bits carry the timestamp.
Ready to try it?
Open the free browser-based UUID generator and apply what you just read — no sign-up, runs locally.
Open the UUID generator tool