Skip to content

UUID Generator

More options
Result —
Details
—
Timestamp
—

A version 4 UUID is 128 bits where 122 are random, written as 32 hex digits in 8-4-4-4-12 groups, such as 919108f7-52d1-4320-9bac-f847db4148a8. Pick v7 when database keys should sort by creation time, or v5 when the same name must always map to the same ID: DNS plus www.example.com always gives 2ed6657d-e927-568b-95e1-2665a8aea6a2.

About this tool

Developers need unique keys for database rows, message IDs, test fixtures and file names, and each format has a trade-off. Version 4 is pure randomness; version 7 starts with a millisecond Unix timestamp so new keys land at the end of a B-tree index; version 1 is the older clock-based layout; version 5 hashes a namespace and a name so it repeats on purpose. ULID packs a timestamp and 80 random bits into 26 Crockford base32 characters, and NanoID gives short URL-safe strings. The check option reads a pasted ID, names its version and variant, pulls out the embedded time for v1, v6, v7 and ULID, and lists it in lowercase, uppercase, braced, unhyphenated and URN form. Randomness comes from the browser's cryptographic source and nothing is sent anywhere. Uniqueness is statistical, not guaranteed by a registry.

How to use it

  1. Choose the job

    Pick an ID format to make new IDs, or Check or decode an ID to read one you already have.

  2. Pick the ID type and count

    Choose v4, v7, v1, v5, ULID or NanoID, and how many to make, up to 100. For v5 enter a namespace and a name.

  3. Set the format

    Under More options, switch to uppercase, add braces for a Windows-style GUID, or drop the hyphens.

  4. Copy an ID

    Each row of the table has its own copy button, so you can take one ID or the whole list.

Examples

UUID v5 for www.example.com

What to do
UUID v5 (from a name)
Namespace
DNS (domain name)
Name
www.example.com

Result Result: 2ed6657d-e927-568b-95e1-2665a8aea6a2
Details: Same input, same ID
Timestamp: Not time-based

  1. SHA-1(dns namespace bytes + UTF-8 of "www.example.com") → first 128 bits, version set to 5, variant to binary 10

SHA-1 of the DNS namespace UUID followed by the name, cut to 128 bits. Anyone running the same input gets this exact ID.

Decode the RFC 9562 v7 example

UUID, GUID or ULID
017F22E2-79B0-7CC3-98C4-DC0C0C07398F
What to do
Check or decode an ID

Result Result: Version 7 (Unix time-ordered)
Details: Variant: RFC 9562
Timestamp: 2022-02-22 19:22:22.000 UTC

  1. Version digit (13th hex) = 7; variant digit (17th hex) = 9 → RFC 9562
  2. First 48 bits 0x017f22e279b0 = 1645557742000 ms since 1970-01-01 UTC

The first 48 bits, 0x017F22E279B0, are Unix milliseconds: 22 February 2022 at 19:22:22 UTC.

Five random v4 UUIDs

What to do
UUID v4 (random)
How many
5

Result Result: b8097413-c37b-4c29-838d-3115b67acbe1
Details: 122 random bits
Timestamp: Not time-based

  1. UUID v4: 122 random bits per ID

Each v4 UUID has 122 random bits; the other 6 bits mark the version and variant.

How it is calculated

RFC 9562: UUID = 128 bits, version in bits 48–51, variant 10 in bits 64–65; v7 = 48-bit Unix ms + 74 random bits; v5 = first 128 bits of SHA-1(namespace + name)

For v4 the tool fills 16 bytes from the random source and overwrites the version nibble with 4 and the top two variant bits with 10. For v7 the first six bytes are the current Unix time in milliseconds, big-endian. Version 1 stores 100-nanosecond ticks since 15 October 1582 split across three fields, with a random node ID whose multicast bit is set so it cannot clash with a real network card. Version 5 concatenates the namespace UUID bytes and the UTF-8 name, hashes them with SHA-1 and keeps the first 16 bytes. Decoding reverses these rules: the 13th hex digit is the version and the 17th gives the variant.

Sources

Use from code or an AI agent Free API · MCP

The same calculation is a free JSON API. No key needed. The answer is in result.stats.primary.

curl -X POST https://api.tools-directory.workers.dev/v1/tools/uuid-generator \
  -H 'Content-Type: application/json' \
  -d '{"inputs":{"kind":"v5","namespace":"dns","name":"www.example.com"}}'

When not to use it

  • Do not use an ID as a secret token: v1, v7 and ULID reveal when they were made.
  • Version 5 is not for privacy: anyone who guesses the name can rebuild the same UUID.
  • Minecraft Java player UUIDs come from Mojang accounts, so a random one will not match a real player.

Common mistakes

  • Treating a GUID in braces as a different value; the braces and letter case are only presentation.
  • Sorting v4 keys and expecting creation order; only v7, v1-by-field and ULID carry time.
  • Storing UUIDs as 36-character strings in a large table instead of a 16-byte binary or native uuid column.

Frequently asked questions

Is a GUID the same as a UUID?

Yes. GUID is Microsoft's name for the same 128-bit identifier. Windows tools usually print it in uppercase inside braces, such as {919108F7-52D1-4320-9BAC-F847DB4148A8}. Turn on uppercase and braces under More options to get that layout; the bits are identical to the lowercase form.

What is a ULID and how is it different from a UUID?

A ULID is also 128 bits, but the first 48 bits are a Unix millisecond timestamp and the rest are random, written as 26 Crockford base32 characters with no hyphens. IDs made later sort after earlier ones as plain text. UUID v7 gives the same ordering while keeping the standard hex layout.

How does a UUID decoder find the version and date?

Choose Check or decode an ID and paste it. The 13th hex digit is the version and the 17th sets the variant. For v7 the first 12 hex digits are Unix milliseconds; for v1 the time is rebuilt from three fields counting 100-nanosecond ticks since 15 October 1582. Random v4 IDs hold no date.

How does a UUID validator check that a string is correct?

Choose Check or decode an ID and paste it. It must be 32 hex digits, either unbroken or grouped 8-4-4-4-12, optionally in braces or after urn:uuid:. Anything else is reported as not valid, with the character count so you can spot a missing or extra digit.

What makes a UUID v4 different from v7?

Version 4 has 122 random bits and no order. Version 7 starts with a 48-bit timestamp in milliseconds and keeps 74 random bits, so keys made later sort later. That keeps database index inserts at the end of the tree instead of scattered, which helps write speed on large tables.

How does a UUIDv5 generator turn a name into an ID?

It joins the 16 bytes of a namespace UUID, such as the DNS namespace 6ba7b810-9dad-11d1-80b4-00c04fd430c8, with the UTF-8 bytes of your name, hashes them with SHA-1 and keeps 128 bits with the version set to 5. The result never changes for the same pair, which suits deduplication.

What is a NanoID and how long should it be?

NanoID draws characters from a 64-symbol URL-safe alphabet (A–Z, a–z, 0–9, underscore and hyphen), so each character carries 6 bits. The default 21 characters give 126 bits, slightly more than a v4 UUID, in a shorter string. Shorter lengths raise the chance of a collision.

Cite this tool

Using this tool in an assignment, article or report? Copy a citation, or a link for your website.

APA

Tools Directory Editorial Team. (2026, December 3). UUID Generator. Tools Directory. Retrieved December 4, 2026, from https://directory.milunir.com/developer-tools/generators-validators/uuid-generator/

MLA

Tools Directory Editorial Team. “UUID Generator.” Tools Directory, 3 Dec. 2026, https://directory.milunir.com/developer-tools/generators-validators/uuid-generator/. Accessed 4 Dec. 2026.

Chicago

Tools Directory Editorial Team. “UUID Generator.” Tools Directory. Last modified December 3, 2026. Accessed December 4, 2026. https://directory.milunir.com/developer-tools/generators-validators/uuid-generator/.

Link<a href="https://directory.milunir.com/developer-tools/generators-validators/uuid-generator/">UUID Generator – Tools Directory</a>