Skip to main content
Tools Star Hub

Developer Tools

What a UUID Is, and How to Generate One

By Tools Star Hub Editorial Team · Published

A UUID is a 128-bit identifier, usually written as five groups of hexadecimal digits separated by hyphens. Version 4 fills most of those bits at random, with a fixed version digit and a fixed variant.

Use one when a test row or a temporary record needs an ID. It is not a sequential key, and it is not a password. The page cannot tell whether another system already stored the same value.

How to generate UUID version 4 values

  1. Choose a count from 1 to 100. One click will not produce more than 100.
  2. Press Generate. Regenerate builds a new set with the same count. Copy one value or copy the list. Clear removes it.
  3. Check the version digit if you need to. In 3f2504e0-4f89-41d3-9a0c-0305e82c3301, the third group starts with 4.
  4. Treat uniqueness as a probability. A match is possible and extremely unlikely. This page does not search any other system.
What a UUID Is, and How to Generate One — Tools Star Hub

Example

One identifier

A version 4 UUID has the shape 3f2504e0-4f89-41d3-9a0c-0305e82c3301.

A batch of 10

Generating 10 values gives 10 separate identifiers for test data.

Things to watch

How the bits are chosen

The generator uses the browser’s crypto.randomUUID() when it is available, and crypto.getRandomValues() otherwise. It does not use Math.random(). A password should come from the Password Generator. A hash of text you already have is the Hash Generator.

FAQ

What does version 4 mean?
Most of the bits are random. The version digit is 4, which is why the third group starts with 4.
Are these sequential?
No. The next value is not the previous value plus one.
Can two generated values match?
It is possible and extremely unlikely. The page still cannot see IDs that already exist somewhere else.
Is a UUID a secret?
No. Do not use it as a password.

To create 1 to 100 UUID version 4 values, use the UUID Generator.