calculate.sh DE

This tool runs in your browser using JavaScript. If it does not appear, please enable JavaScript or reload the page. The description below explains how it works.

UUID Generator

A UUID (Universally Unique Identifier, also called a GUID) is a 128-bit identifier written as 32 hex digits, usually grouped as 8-4-4-4-12 - for example 550e8400-e29b-41d4-a716-446655440000. This tool creates UUIDs in bulk and formats them for copying.

How to use

  1. Pick a version - v1, v4, or v7 (see below).
  2. Set the count - how many UUIDs to generate, from 1 to 10 000 (out-of-range values are clamped with a note).
  3. Generate - a fresh set is produced every time the button is pressed, and whenever the version or count changes.
  4. Format to taste:
    • UPPERCASE - hex letters in capitals. Case is irrelevant to the value; it is purely presentation.
    • Format - the classic 8-4-4-4-12 with hyphens, a bare 32-hex-digit string (no hyphens), or a urn:uuid:-prefixed form.
    • Separator - one per line or comma separated. Case, format, and separator only change how the same generated set is displayed - they never re-roll the UUIDs.
  5. Copy all - copies the formatted list to your clipboard.

The versions

The 128 bits differ by version (the 13th nibble) and where randomness comes from:

  • v4 - the workhorse. 122 of the 128 bits are random (crypto.randomUUID-quality). Best default for keys, session IDs, and dedupe tokens.
  • v1 - time-based: 60 bits of timestamp plus a clock sequence and a node field, which means a v1 UUID reveals when it was created and its order matches creation order only within a single generator. Useful when you need to embed time (e.g. audit logs), but avoid it for anything that must not leak data.
  • v7 - also time-ordered (a timestamp prefix, then random bits), but without v1's node/clock leakage. The order of the UUIDs matches their creation order, which makes v7 ideal for database primary keys where lexicographic order improves index locality.

You can verify the version yourself: the first character of the third group is 1, 4, or 7, and the first character of the fourth group is always in the range 8–b (the variant marker), e.g. …-41d4-a716-….

Notes

  • UUIDs are case-insensitive: GitHub's 550e8400-… and 550E8400-… are the same identifier. Different database/API conventions prefer one case; both survive round-tripping.
  • Empty hyphens matter: 550e8400e29b41d4a716446655440000 and 550e8400-e29b-41d4-a716-446655440000 are the same 128-bit value written two ways.
  • Collisions are effectively impossible - a v4 has 122 random bits, so finding a match takes on the order of 2⁶¹ guesses (the birthday bound). For a realistic workload of one billion v4 UUIDs in total, the probability of any collision is about 1 in 10¹⁹. Only at extreme volumes does it become measurable: generating 1 000 000 v4 UUIDs per second for 1000 years (about 3.2 × 10¹⁶ IDs) gives a collision probability of roughly 0.009 %, or about 1 in 10 700. These figures assume a properly seeded random source, which the browser's crypto API provides.
  • JavaScript's crypto.randomUUID() returns a v4; the uuid library used here provides the v1 and v7 variants as well.