Skip to content

122 random bits, written as 8-4-4-4-12

Generate UUID version 4

A version 4 UUID is a random id in a fixed shape. Databases use it when they do not want a guessable counter. It is not a secret and not a checksum.

crypto.randomUUID fills 122 bits at random. Four bits are fixed to say version 4, and two bits say the RFC 4122 variant. You can see the version as the first character of the third group: it is 4. Upper case is a display choice. The bits do not change if you only change case. This page will generate up to 20 at a time. It does not mint version 1 time-based ids or version 7 ids.

Identifiers are created in this tab and forgotten when you leave. They are not registered anywhere.

This tool runs in your browser. Turn on JavaScript to use it.

How to read one identifier

This sample shows the layout. Generate a new one for real use. The 4 marks the version. The following group starts with 8, 9, a, or b for the variant.

Sample
4f2c8a10-6b3d-4e7a-8d5e-6f7a8b90c1d2
Version nibble
4 in 4e7a
Variant
8 in 8d5e

How to use it

  1. 1Choose how many you need, up to 20.
  2. 2Generate, then copy one line or the whole list.
  3. 3Turn on upper case only if the other system prints them that way.

Good to know

  • Do not use a UUID as a password. It is an identifier, and it is often stored in plain text.
  • Collisions are unlikely for ordinary apps. They are not a mathematical impossibility.
  • Nil UUIDs and version 7 timestamps are not produced here.

Questions

Are these unique across computers?

They are random, not coordinated. Two machines can collide, with a very small chance. There is no central registry.

Why does the third group start with 4?

That nibble is the version. Version 4 means the rest of the id is random.

Can I decode a UUID back into data?

Not usefully. Version 4 does not embed your text, time, or MAC address.

Related tools

  • Generate a ULID

    A ULID sorts by creation time and still has a random tail, so two ids made in the same millisecond are not the same. It is an identifier, not a secret.

  • Generate a random token

    A token is a string of random bits. This page draws 8 to 64 bytes and prints hex or base64url, the form often used in URLs.

  • Generate a random password

    A password from a coin-flip source is stronger than a word you adapted. This page draws each character from the sets you leave on, and then forgets it when you leave.