← Back to context

Comment by zaken

1 year ago

I tried to find the biggest UUID and if I got it right, it's

99999999-9999-4999-9999-999999999999

(note the 4 in the 3rd block)

I'm curious why it's not 99999999-9999-9999-9999-999999999999 (all 9s)?

It depend on the UUID version you're using. Version 4 (Random) will always have that value be 4 as per RFC 9562. So 99999999-9999-9999-9999-999999999999 is a valid UUID but not a valid UUID v4. If you wanted to be pedantic the website should have been named https://everyuuidv4.com/

https://datatracker.ietf.org/doc/html/rfc9562

The values are hexidecimal, so all "9s" isn't the biggest UUID, but all "f's". Specifically, I think: `ffffffff-ffff-4fff-bfff-ffffffffffff`.

The "4" in the 3rd block is the only permitted value as these UUIDs are using the GUIDv4 format. I'm not sure what's going on in the 4th block, but the references and linked RFC in the Wikipedia article might reveal more details: https://en.wikipedia.org/wiki/Universally_unique_identifier#...

  • If you're going by hex, the biggest UUID is entirely f's, 32 of them. It's defined specially and doesn't have version or variant.

    • I see what you mean, but I was going by the definition of "UUID" used on everyuuid.com. The UUID of 32 "f's" isn't in the list.

      1 reply →

  • But if it’s all Fs, that means you have the sign bit set, so it’s not the largest.

    It’s the smallest that’s less than zero right?

Looks like it only generates v4 UUIDs, which is a bit of a ripoff.

Also you'll find that the first character of the 4th block is forced to be 8, 9, a, or b. That's true of standard UUIDs of any version.

The 4 indicates UUIDv4.

If you were looking for the biggest hexadecimal UUID, find one with f instead of 9.