Generate a UUID (v4)

Generate a random version-4 UUID — for primary keys, correlation IDs, or test fixtures — one at a time or in bulk, with secure browser randomness.

Open this example in UUID Generator

Open the tool, then paste the sample input below. Everything runs locally in your browser.

Open this example in UUID Generator →

The problem

You need a unique identifier: a database key, a request correlation id, or seed data for a test. A version-4 UUID is random and collision-resistant. Generating it in the browser gives you a valid UUID instantly without a library or a server call.

Sample input

Settings
version: 4 (random)
count:   1

Expected output

Example UUID
3f50b9a2-8c1e-4d7b-9f2a-1b6c5d4e3f21

Illustrative only — each run differs. The 13th hex digit is 4 (the version) and the 17th is 8-b (the variant); the 8-4-4-4-12 grouping is the standard UUID format.

How to do it

  1. Choose the UUID version, such as v4.
  2. Set how many to generate.
  3. Generate the UUIDs.
  4. Copy one or the whole list.
  5. Use them as keys, IDs, or test data.

Common mistakes

  • Expecting UUIDs to be sequential or sortable.
  • Using a v4 UUID where a time-ordered ID is wanted.
  • Storing a UUID as text when a native UUID type exists.
  • Assuming uppercase and lowercase forms are different IDs.
  • Trimming the dashes and breaking the standard format.

Related tools

Related guides

FAQ

What is a version-4 UUID?

A version-4 UUID is a 128-bit identifier whose bits are mostly random, formatted as 8-4-4-4-12 hex groups. It is the common choice for random unique IDs.

Are v4 UUIDs sortable?

No. They are random, so they do not sort by creation time. Use a time-ordered identifier if you need ordering.

How unique are they?

Collisions are astronomically unlikely for version 4 because of the large random space, so they are safe as keys without coordination.

Is uppercase or lowercase canonical?

UUIDs are case-insensitive; lowercase is the common canonical form. Treat the two cases as the same identifier.

Are the UUIDs uploaded?

No. Generation runs locally in your browser. Nothing is sent to a server.

UUIDs are generated locally in your browser. Nothing is uploaded.

Explore the full developer toolkit

Generate UUIDs and passwords, hash and encode text, plus every other utility.

Browse all developer tools →

Practical example and expected result

Generate a random version-4 UUID - for primary keys, correlation IDs, or test fixtures - one at a time or in bulk, with secure browser randomness. In practice, this is most useful when you need a quick, repeatable check on a developer artifact before adding it to a ticket, pull request, test fixture, or support note.

A realistic input for this workflow is version: 4 (random) count: 1. The expected result should resemble 3f50b9a2-8c1e-4d7b-9f2a-1b6c5d4e3f21, with the same important values preserved.

Troubleshooting checklist

  • Confirm you copied the complete developer artifact and not only a partial line or truncated preview.
  • Run the local tool once with a safe sample, then repeat with the real data only if your team policy allows it.
  • Check quoting, escaping, whitespace, encoding, timestamps, and environment-specific values before trusting the result.
  • Before sharing output, remove secrets, tokens, cookies, customer data, and production hostnames that are not needed for the review.

Next useful steps

Review checklist before sharing the result

For Generate a UUID (v4), the safest workflow is to test with a small sample, confirm the output shape, then repeat with the real artifact only when needed. Keep the original input open until you verify that no value was dropped, decoded twice, sorted unexpectedly, or changed from text into a different type.

Before copying the result into a pull request, issue, chat thread, or support ticket, scan for private values. Replace real IDs, bearer tokens, session cookies, email addresses, internal hostnames, and customer data with placeholders. If another tool is listed above, use it as the second pass rather than manually editing complex output.

  • Keep one line of context explaining why the transformation was needed.
  • Preserve enough sample structure for a reviewer to reproduce the result locally.
  • Note any assumptions about encoding, timezone, delimiter, schema version, or runtime environment.