Skip to content

UUID Generator

Generate random version 4 UUIDs (GUIDs) with your browser's cryptographically secure random generator and copy them with one click.

Runs in your browser Free, no sign-up

Loading generator...

What is UUID Generator?

This UUID generator creates random version 4 UUIDs. A UUID (universally unique identifier), called a GUID in Microsoft tools, is a 128-bit identifier written as 32 hexadecimal digits in five groups, 8-4-4-4-12, for example 3f2c9a1e-7b4d-4c1a-9e2f-5d6b8a0c4e71. Because any system can create one without asking a central server for the next number, UUIDs are used as database primary keys, request and correlation IDs, file names and message IDs.

In a version 4 UUID, 122 of the 128 bits come from your browser's cryptographically secure random number generator; the other six bits mark the version and variant. Five fresh UUIDs appear every time you click Generate New, each with its own copy button.

How to use UUID Generator

  1. Open the page: five random v4 UUIDs are generated straight away.
  2. Click the copy icon next to a UUID to copy it to your clipboard.
  3. Click Generate New whenever you need another batch of five.
  4. Paste the UUID into your code, database record, configuration file or test fixture.

Key features

  • Random version 4 UUIDs as defined in RFC 9562
  • Uses the browser's cryptographically secure crypto.randomUUID()
  • Five UUIDs per batch, with a new batch in one click
  • Copy button for every UUID
  • Standard lowercase 8-4-4-4-12 format accepted by every database and language
  • Generated locally; nothing is sent to a server

Common use cases

  • Primary keys for PostgreSQL uuid columns, MySQL, SQL Server or MongoDB documents
  • Request, correlation and idempotency IDs for APIs and distributed tracing
  • Seed data and fixtures for automated tests
  • Unique names for uploaded files and object-storage keys
  • Message and event IDs in queues such as Kafka, SQS or RabbitMQ

Technical details & standards

Version 4 UUIDs are defined in RFC 9562, which replaced RFC 4122. The 13th hex digit is always 4 (the version) and the 17th is always 8, 9, a or b (the variant), so a v4 UUID has the shape xxxxxxxx-xxxx-4xxx-[89ab]xxx-xxxxxxxxxxxx.

With 122 random bits there are about 5.3 × 10^36 possible values. You would have to generate roughly 2.7 quintillion UUIDs before reaching even a 50% chance of a single duplicate. The UUIDs are created with crypto.randomUUID(), which draws from the operating system's secure random source, entirely inside your browser.

Frequently asked questions

What is the difference between a UUID and a GUID?

Nothing in practice. GUID (globally unique identifier) is Microsoft's name for the same 128-bit 8-4-4-4-12 value. Some Microsoft tools print GUIDs in uppercase or wrap them in braces, but the identifier itself is identical.

Can two version 4 UUIDs ever be the same?

In theory yes, in practice no. A v4 UUID has 122 random bits, so you would need to generate about 2.7 quintillion of them to reach a 50% chance of one collision. Duplicates in real systems almost always come from a broken random generator or copied data, not from chance.

Which UUID version should I use?

Version 4 (random) suits most purposes. If the UUID is a database primary key on a large, write-heavy table, consider version 7: it starts with a timestamp, so new values sort after old ones and index inserts stay fast. Avoid version 1, which can expose the creation time and the machine's MAC address. This tool generates version 4.

Can I use a UUID as a password, API key or session token?

A v4 UUID from a secure generator is hard to guess, but UUIDs are designed as identifiers, not secrets, and they tend to end up in URLs and logs. For credentials, use a purpose-made random secret, such as one from the Secure Password Generator.

Is my data safe?

Processing happens locally in your browser. Tool input is not sent to CodeUnpack servers.

Does it work offline?

Once the page has loaded, this tool can process input without an internet connection.