UUID generator

Generate UUID v1, v7 (Unix ms time), v3/v5 (namespace + name), or random v4 in the browser.

{{ uuidGenerator.error }}

{{ t("uuidGenerated") }}

{{ t("uuidGuideTitle") }}

{{ t("uuidGuideIntro") }}

{{ t("uuidDiffTitle") }}

{{ t("uuidDiffIntro") }}

  • v1: {{ t("uuidDiffV1") }}
  • v3: {{ t("uuidDiffV3") }}
  • v4: {{ t("uuidDiffV4") }}
  • v5: {{ t("uuidDiffV5") }}
  • v7: {{ t("uuidDiffV7") }}

{{ t("uuidBuildTitle") }}

  • {{ t("uuidBuildV1") }}
  • {{ t("uuidBuildV3") }}
  • {{ t("uuidBuildV4") }}
  • {{ t("uuidBuildV5") }}
  • {{ t("uuidBuildV7") }}

{{ t("uuidProsConsTitle") }}

  • v1: {{ t("uuidProsConsV1") }}
  • v3: {{ t("uuidProsConsV3") }}
  • v4: {{ t("uuidProsConsV4") }}
  • v5: {{ t("uuidProsConsV5") }}
  • v7: {{ t("uuidProsConsV7") }}

{{ t("uuidUseCasesTitle") }}

  • {{ t("uuidUseCaseV1") }}
  • {{ t("uuidUseCaseV3") }}
  • {{ t("uuidUseCaseV4") }}
  • {{ t("uuidUseCaseV5") }}
  • {{ t("uuidUseCaseV7") }}

{{ t("uuidHowToChooseTitle") }}

{{ t("uuidHowToChooseText") }}

Overview

The need for unique identifiers in distributed systems predated the UUID name itself. In the 1980s, Apollo Computer — the company that built high-performance Unix workstations before the PC era — faced a real problem: how to identify resources across a network of independent machines without a central control server. The solution emerged as UUIDs inside the DCE (Distributed Computing Environment) standard from the Open Software Foundation. Microsoft later adopted a variant called GUID (Globally Unique Identifier) in COM and the Windows registry — GUID and UUID are technically the same thing with different names. RFC 4122, published in 2005, formalized the standard that most languages and databases implement today.

There are seven UUID versions, each designed for a different purpose. Version 1 uses the current timestamp in 100-nanosecond intervals since October 15, 1582 — an oddly specific choice: the date of the Gregorian calendar adoption — combined with the MAC address of the network interface. It works and is monotonically increasing, but it leaks information about the machine and the exact time of generation. Versions 3 and 5 are deterministic: given the same namespace and name, they always produce the same UUID — v3 uses MD5 and v5 uses SHA-1 (prefer v5 for new code). They are useful for creating stable IDs from content, like canonical URLs. Version 4 is the most popular: 122 bits of pure randomness — the probability of collision when generating one billion UUIDs per second for one hundred years is less than one in a billion. Version 7, published in RFC 9562 in 2024, is the most significant evolution: it combines the first 48 bits as a Unix millisecond timestamp with random bits in the remaining positions. The result is a time-sortable UUID, ideal as a database primary key — unlike v4, v7 insertions do not fragment B-tree indexes.

Choosing the right version depends on context. For primary keys in high-insert databases, v7 is the right answer in 2024: it is lexicographically sortable, reduces index fragmentation, and retains enough randomness to prevent collisions. For random identifiers with no ordering requirement — session tokens, order IDs, event identifiers — v4 is the classic, widely-supported choice. For generating stable IDs from content — a canonical URL, a filename, a string-identified resource — use v5. Avoid v1 in new systems: the MAC address inclusion violates privacy and can create collisions in virtual environments where the MAC is synthetically generated. This tool uses the browser's `crypto.getRandomValues` to guarantee cryptographically secure randomness in v4 and v7 modes.

Technical deep dive

Common questions summarized

  • What is this tool for?: It runs fully in your browser: useful to validate, format, or convert data in everyday development.
  • Are my inputs sent to a server?: Processing happens locally with JavaScript. We do not store what you paste into the text areas.
  • Can I use this for real production data?: Use at your own risk. For secrets (passwords, tokens), prefer controlled environments and your company policies. And always review the generated contents. Never trust blindly things you see on the internet.

Sample payload to try

  • See also the larger "Code Snippets" sample; paste this excerpt to try locally: Format — 550e8400-e29b-41d4-a716-446655440000

Tool guide

  • What a UUID is A 128-bit universally unique identifier in hyphenated text form. Different versions follow different rules (time, randomness, hash with namespace, etc.).

  • What the tool does Generates one or many UUIDs in the supported versions (v1, v3, v4, v5, v7) according to options, in the browser.

  • Why use it Primary keys in tests, documentation examples, API mocks, and forms with low collision risk (especially v4/v7).

Code Snippets

Code example
550e8400-e29b-41d4-a716-446655440000

Format

550e8400-e29b-41d4-a716-446655440000

FAQ

What is this tool for?

It runs fully in your browser: useful to validate, format, or convert data in everyday development.

Are my inputs sent to a server?

Processing happens locally with JavaScript. We do not store what you paste into the text areas.

Can I use this for real production data?

Use at your own risk. For secrets (passwords, tokens), prefer controlled environments and your company policies. And always review the generated contents. Never trust blindly things you see on the internet.