PlayTools

UUID versions: randomness, time, and namespaces

v1, v4, v5 형식의 RFC 4122 UUID를 일괄 생성합니다. 대문자 및 하이픈 형식 사용자 정의 지원.

Runs in your browser — nothing you enter is uploaded
UUID 버전
UUID 5개
8973bbc5-4c31-459d-8157-ccb6d5ebb7b7
49818fd4-45de-4689-accc-76be58876818
45a211c5-2fff-403e-96e1-e759ab3b2ef8
25223b8e-dbae-4199-a6e0-75ecc2c61279
eb490d2c-7ab5-4a6f-b5b5-621396d31722

UUID v4 예시

550e8400-e29b-41d4-a716-446655440000

형식: 8-4-4-4-12 16진 문자

이 도구 사용법

  1. 버전 선택: 일반적으로 v4(난수).
  2. 슬라이더로 개수(최대 50).
  3. 필요 시 대문자·하이픈 제거.
  4. 생성 후 개별 또는 전체 복사.

UUID versions: randomness, time, and namespaces

v4 is random (RFC 4122); v1 is time/MAC-derived (privacy concerns on some networks); v5 hashes a namespace + name. Choose v4 for opaque IDs unless you need sortable time proximity.

Database uniqueness still needs constraints—collision probability is tiny but not a substitute for transactional checks.

What each option produces

  • Version 4 (default): 122 random bits from your browser’s cryptographically secure generator, plus the fixed version and variant bits. This is the right choice for almost every new identifier.
  • Version 1: built from the current time as the count of 100-nanosecond intervals since 15 October 1582 (the start of the Gregorian calendar), a random clock sequence, and a random 48-bit node ID with the multicast bit set. Classic v1 used the computer’s network MAC address as the node; the random node keeps your hardware address out of the ID, as RFC 9562 recommends.
  • Nil UUID: all zeros (00000000-0000-0000-0000-000000000000), used as an explicit “no value” marker.
  • Formatting: generate up to 50 at once, switch to uppercase, or remove the hyphens to get a 32-character hex string.

Reading a UUID

A UUID is 128 bits written as 32 hexadecimal digits in five groups (8-4-4-4-12):

f47ac10b-58cc-4372-a567-0e02b2c3d479
              ^    ^
              |    variant: 8, 9, a or b = RFC 9562 layout
              version: 4 = random

The first digit of the third group is always the version, and the first digit of the fourth group shows the variant. That is why a v4 UUID always has a 4 in the 13th position, and why only 122 of the 128 bits are random. For a v1 UUID the first three groups hold the timestamp, so anyone can read off when it was created — something to keep in mind before exposing v1 IDs publicly.

Which version should you use?

  • v4 for general identifiers: API resource IDs, file names, idempotency keys, correlation IDs in logs.
  • v7 for new database primary keys: defined in RFC 9562 (2024), it starts with a Unix-millisecond timestamp, so values sort in creation order and index far better than random v4 keys in B-tree indexes. This tool does not generate v7 yet; most languages have a maintained library for it.
  • v1 when an existing system expects it, for example some older Cassandra schemas (TimeUUID).
  • v5 when the same input must always produce the same ID (it hashes a namespace and a name with SHA-1). Not offered here because it needs those inputs.

Will two UUIDs ever collide?

For v4, the 50% collision point arrives at about 2.7 × 10¹⁸ generated IDs — roughly 86 years of producing a billion UUIDs every second. In practice, a duplicate is far more likely to come from a bug, such as a copied ID or a badly seeded generator in another system, than from chance. Keep a unique constraint on the database column anyway; it costs nothing and catches the bugs.

Unpredictable is not the same as secret. RFC 9562 advises against assuming UUIDs are hard to guess, so do not use one as a password-reset or session token — use a dedicated random token instead.

Storing and comparing UUIDs

  • Use a native type where one exists — uuid in PostgreSQL, uniqueidentifier in SQL Server — or BINARY(16) in MySQL. Storing the 36-character string takes more than twice the space and slows indexes.
  • Compare case-insensitively: f47ac10b… and F47AC10B… are the same UUID. Microsoft tools traditionally show GUIDs in uppercase, often wrapped in braces {…}.
  • Hyphen-free 32-character strings are common in URLs and file names. Most parsers accept both forms, but be consistent within one system.

Generating UUIDs in code

When you need IDs at runtime rather than a handful to paste, every mainstream platform has a built-in v4 generator:

JavaScript   crypto.randomUUID()            // browsers (HTTPS) and Node.js
Python       import uuid; uuid.uuid4()
Java         java.util.UUID.randomUUID()
C# / .NET    Guid.NewGuid()
PostgreSQL   SELECT gen_random_uuid();      -- built in since v13
Go           uuid.New()                     // github.com/google/uuid
Shell        uuidgen                        # macOS prints uppercase

In their current implementations these use the operating system’s secure random source, like this page does. Avoid hand-rolled versions built on Math.random(), which older code snippets online still copy around.

These free tools pair well with this page — open them in a new tab to finish your workflow.

자주 묻는 질문

UUID란 무엇인가요?

UUID(범용 고유 식별자)는 컴퓨터 시스템에서 정보를 고유하게 식별하는 데 사용되는 128비트 숫자입니다. 8-4-4-4-12로 그룹화된 32개의 16진수 숫자로 표현됩니다.

UUID 버전 간의 차이점은 무엇인가요?

UUID v1은 현재 타임스탬프와 MAC 주소를 사용합니다. UUID v4는 난수를 사용하며 가장 일반적으로 사용되는 버전입니다. 시간 기반 순서(v1) 또는 이름 기반 결정론(v3/v5)이 특별히 필요하지 않은 경우 v4를 권장합니다.

UUID는 정말 고유한가요?

UUID v4는 122개의 무작위 비트를 가지며 약 2¹²²(약 5.3×10³⁶)개의 가능한 값이 있습니다. 실제로 중복이 생성될 확률은 무시할 수 있을 만큼 작습니다.

UUID를 데이터베이스 기본 키로 사용할 수 있나요?

예, UUID는 특히 자동 증가 정수가 충돌할 수 있는 분산 시스템에서 기본 키로 널리 사용됩니다. 임의 UUID(v4)는 일부 데이터베이스에서 인덱스 단편화를 일으킬 수 있습니다.

UUID는 대소문자를 구분하나요?

아닙니다. UUID 표현은 대소문자를 구분하지 않습니다. 대문자와 소문자 16진수 모두 유효하며 동일합니다.

브라우저에서 UUID를 생성하는 것이 안전한가요?

예. 이 도구는 브라우저의 내장 crypto.randomUUID() 또는 암호학적으로 안전한 난수 생성기를 사용하므로 출력은 프로덕션 사용에 적합합니다.