UUID Generator

Generate up to 500 random version 4 UUIDs at once, the 128-bit identifiers used for database keys and other unique IDs. Each one comes from your browser's cryptographically secure random generator.

Updated

Developer ToolsPopular● Free No upload Instant

Loading UUID Generator…

Your browser is preparing the tool. It runs 100% locally.

Quick answer

Generate version 4 (random) UUIDs, the 128-bit identifiers often used as database primary keys, one per line and up to 500 at a time. Each comes from the browser's cryptographically secure random generator and has 122 random bits plus 6 fixed bits that mark it as version 4. The odds of two ever colliding are astronomically small. Your browser makes them, so the IDs never leave your device.

What the UUID Generator does

Choose how many you need and the tool prints that many random UUIDs, each in the standard 8-4-4-4-12 hexadecimal layout with the version digit fixed at 4. You can paste them straight into code, a database seed, a config file or a test fixture.

Each UUID is generated independently. A version 4 UUID contains no counter, timestamp or machine address, so it reveals nothing about when or where it was made. The newer time-ordered versions sort by creation time; version 4 gives up that ordering in exchange for being completely unpredictable.

How it works

The tool calls the browser's built-in crypto.randomUUID where available and otherwise fills the pattern from crypto.getRandomValues. Both use the same cryptographically secure random source, not the ordinary Math.random. It then sets the six bits that mark the identifier as version 4, variant 1.

Those 122 random bits are what make a version 4 UUID unique. There are so many possible values that you could generate a billion a second for decades and still not expect a single collision. That is why many machines can create UUIDs at the same time without checking with each other.

Generation algorithm

  1. Take the count. Read how many UUIDs you asked for, capped at 500.
  2. Draw secure random bits. Use the browser's cryptographic random generator (crypto.randomUUID or getRandomValues), not Math.random.
  3. Set the version and variant. Fix the six bits that mark the value as version 4, variant 1, leaving 122 bits random.
  4. Format and list. Write each as the 8-4-4-4-12 hex string, one per line.

Anatomy of a version 4 UUID

xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx 4 = version (always 4) y = variant (8, 9, a or b) x = random hex digit 122 random bits in total

Only the version and variant positions are fixed. Every other digit is cryptographically random.

Privacy

Your browser generates the UUIDs from its own secure random source. The tool requests nothing from a server and sends nothing to one, so no one else sees the values.

A version 4 UUID is pure randomness, with no personal data, timestamp or device identifier inside. Unlike the time-based UUID versions, it doesn't reveal when or where it was created.

Technical details

Version4 (random)
Format8-4-4-4-12 hex, 36 characters
Random bits122 of 128
Randomnessbrowser crypto (not Math.random)
Batch size1 to 500
Caselowercase hex
Where it runsGenerated in your browser, never sent to a server

Standards and references

  • UUID version 4 (RFC 9562): The current UUID standard, which replaced RFC 4122 in 2024. Version 4 is the fully random variant: 128 bits, 122 of them random.
  • Cryptographic randomness: The IDs come from the browser's secure random generator (the Web Crypto source), not Math.random, so they are unpredictable as well as unique.
  • Collision odds: With 122 random bits the chance of a clash is about one in 2 to the power 122. You would need to generate billions per second for decades to expect even one.

Accuracy and limits

These are version 4 (random) UUIDs. They are unpredictable and work well as opaque keys, but they have no time ordering, so you can't sort rows keyed by them by creation time. If you need ordering, a time-based version such as version 7 fits better.

Uniqueness is overwhelmingly likely but not mathematically guaranteed. The collision odds are about one in 2 to the power 122, which is negligible. If your system cannot tolerate even a theoretical clash, add a unique constraint in the database as a backstop.

The quality of the randomness depends on the browser's crypto generator, which is designed to be cryptographically secure. The fallback used in older browsers draws from the same secure source, so these IDs are not weak and predictable the way Math.random output would be.

The values are lowercase. The standard treats UUIDs as case-insensitive, but some systems compare them as plain strings, so pick one case and use it everywhere to avoid mismatches.

Each batch is capped at 500. For a larger set, run it again. Batches are independent, so combining them doesn't raise the collision risk in any meaningful way.

Real-world uses

Database keys

Create primary keys without a central counter handing out numbers.

Test data

Fill fixtures and mock records with IDs that look like production ones.

Correlation IDs

Tag a request or log entry so you can follow it across services.

File and resource names

Name uploads or temporary objects so two never share a name.

When it fits, and when it doesn't

Good for

  • Random, unguessable unique identifiers
  • Keys created independently on many machines
  • Test and seed data
  • Correlation or request IDs

Not the best choice for

  • IDs that need to sort by creation time
  • Short, human-friendly codes
  • Cryptographic secrets or tokens by themselves
  • Guaranteed uniqueness without a database constraint

For time-ordered IDs that keep database rows close together, use a version 7 UUID, which embeds a timestamp. For a short code people can share, a nanoid or your own short-ID scheme is more compact. For a secret token, use a dedicated token generator.

Frequently asked questions

What is a version 4 UUID?
A 128-bit identifier that is almost entirely random: 122 random bits, with 6 bits fixed to mark it as version 4. It is the most common UUID type, used wherever you need a unique ID without a central system handing them out.
Are these UUIDs really unique?
Effectively, yes. With 122 random bits the chance of two matching is about one in 2 to the power 122. You would need to generate a billion per second for decades to expect a single collision, so real systems treat them as unique.
Is the randomness secure?
Yes. The tool uses the browser's cryptographic random generator (the same source as crypto.randomUUID), not Math.random, so the IDs are unpredictable as well as unique.
Why does every UUID have a 4 in it?
The 4 marks the version. The third group always starts with 4 in a version 4 UUID, and the fourth group starts with 8, 9, a or b for the variant. Those are the only fixed positions.
Can I sort records by their UUID?
Not by time. Version 4 UUIDs are random and have no creation order. If you need IDs that sort by time, use a version 7 UUID, which puts a timestamp at the front.
How many can I generate at once?
Up to 500 per batch. For more, run it again. Batches are independent, so combining them does not increase the collision risk.
Are UUIDs case-sensitive?
The standard says they are case-insensitive, but some systems compare them as plain strings. This tool outputs lowercase; keep one convention to avoid mismatches.
Can I use a UUID as a password or token?
Not on its own. A version 4 UUID is random, but it is designed as an identifier rather than a secret, and it is often stored or logged where anyone can see it. Use a dedicated token generator for secrets.
Do these UUIDs contain a timestamp or my device info?
No. Version 4 is pure randomness and reveals nothing about when or where it was made. The older time-based and address-based versions do carry that information.
What standard defines them?
RFC 9562, published in 2024, which updated and replaced the long-standing RFC 4122. Version 4 itself did not change: 122 random bits with fixed version and variant markers.
Are the IDs sent to a server?
No. Your browser generates them on your device and doesn't send them anywhere.
What does the 8-4-4-4-12 mean?
It is the number of hex digits in each hyphen-separated group: eight, four, four, four, then twelve. That makes 32 hex digits and 36 characters in all.

References

The tool builds version 4 UUIDs (122 random bits) with crypto.randomUUID, the browser's cryptographic source, rather than Math.random. They carry no timestamp or ordering, and the collision odds of about one in 2 to the power 122 are negligible, though not a mathematical guarantee.

PopularHot

JSON Formatter

Paste messy or minified JSON and get it back pretty-printed with 2-space indentation. The same step tells you whether the JSON is valid.

DeveloperOpen Tool
Popular

Base64 Encoder

Encode any text to standard Base64 in your browser, emoji and accented letters included.

DeveloperOpen Tool
Popular

Hash Generator

Get the MD5, SHA-1, SHA-256, SHA-384 and SHA-512 hashes of any text at once, updated as you type, with a plain note on which ones are still safe for security work.

DeveloperOpen Tool

Base64 Decoder

Decode Base64 back to readable text in your browser, Unicode included, and get a plain error message when the input is broken.

DeveloperOpen Tool

URL Encoder

Percent-encode a value so it can sit safely inside a URL. Spaces, ampersands, slashes and other special characters become %-codes, using the browser's encodeURIComponent.

DeveloperOpen Tool

URL Decoder

Turn percent-encoded text back into readable characters: %20 becomes a space and %26 an ampersand. It uses the browser's decodeURIComponent.

DeveloperOpen Tool

Back to the UUID Generator

Generate as many as you need at the top of the page. It runs on this device and needs no account.