UUID v4 Fixed Randomness Bits Lookup

Report the 122 available random bits of a UUIDv4 after validating its canonical version and variant syntax.

Description

A UUID is 128 bits long, but a version-4 UUID reserves four version bits and two variant bits.

A UUID is 128 bits long, but a version-4 UUID reserves four version bits and two variant bits. That leaves 122 positions intended for random data rather than 128 independent random bits.1, 2

Report the 122 available random bits of a UUIDv4 after validating its canonical version and variant syntax.

When to use UUID v4 Fixed Randomness Bits Lookup

Use this tool to report the 122 available random bits of a UUIDv4 after validating its canonical version and variant syntax.

Choose the text, counts, explicit reference time or format parameters requested by this tool. Follow the stated byte, epoch-time and randomness assumptions.

How to use UUID v4 Fixed Randomness Bits Lookup and understand its results

  1. Choose the text, counts, explicit reference time or format parameters requested by this tool. Follow the stated byte, epoch-time and randomness assumptions.
  2. Enter uuid using the field table and calculation rules, then run the tool.
  3. Read randomBits, fixedBits. The explanation below defines the units, signs, ordering and any flags or placeholder values.
  4. If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
Input fieldMeaningValue type; see rules belowRequirement
uuidUUIDv4 textstring; maximum length: 36Required

Enter a canonical hyphenated UUIDv4 string. Validation requires the 8-4-4-4-12 hexadecimal grouping, version digit 4 and variant digit 8, 9, A or B; hexadecimal case is unrestricted. A matching input returns randomBits 122 and fixedBits 6. An unsuitable version, variant, length or spelling is an input error rather than a false validity flag.

available randomBits = 128 − 4 − 2 = 122

Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.

Output fieldMeaningValue type
randomBitsAvailable random bit positionsinteger; minimum: 0; maximum: 9007199254740991
fixedBitsVersion and variant bit countinteger; minimum: 0; maximum: 9007199254740991
json
{
  "input": {
    "uuid": "550e8400-e29b-41d4-a716-446655440000"
  },
  "output": {
    "randomBits": 122,
    "fixedBits": 6
  }
}

Limitations and assumptions

This reports the layout's available random capacity and does not measure the supplied UUID's actual entropy. It does not generate UUIDs, audit a random generator or establish that different UUIDs are independent or collision-free.

Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Extremely large text inputs are rejected. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.

Alternative or Complementary methods

Use Random Hex Token Bits From Characters: Return the ideal uniform-random capacity of a hexadecimal token from its number of independently random characters. For a complementary task, use Birthday-Bound Collision Probability: Calculate the standard birthday collision approximation for independent uniform samples from a finite outcome space.

Further background: RFC 9562: UUID version 4 layout.

References

  1. UUID v4 Fixed Randomness Bits Lookup — tool.io

  2. RFC 9562: UUID version 4 layout — RFC Editor

Similar or alternative tools

Don't forget to set a bookmark for tool.io!
Privacy | Imprint | Cookies