Generate UUID v4

Generate a random UUID version 4 for an opaque identifier.

freeworks offlinenothing uploaded
ToolUUID v4 Generator
Input
Output
Put this on your own site

The frame below runs the same code as this page, in the reader's own browser. Nothing is sent to us, and nothing is sent to you.

Pick a dark background and the text and panels follow it, so the frame stays readable on a dark page.

Preview

How it works

Random bytes fill a 128-bit UUID, then version and variant bits are set to identify the standard layout. The result is rendered in canonical hexadecimal groups.

  • Randomness avoids time and hardware-address leakage.
  • Only the non-version and non-variant bits carry random data.

Worked example

Single UUID v4
Generate one random UUID v4
Input
											Count: 1
Uppercase: false
										
Output
												293fbcf6-e0f2-494d-bcc5-83366e849778
											

When to use this

Database records, request correlation IDs, and test fixtures use random UUIDs.

Edge cases

  • Weak randomness reduces collision resistance.
  • Version and variant bits are fixed.
  • Hyphen changes affect presentation, not the underlying bytes.

References