> uuid | guid | generate <
// Generate universally unique identifiers (UUID/GUID) instantly
Cryptographic Random
UUID v4 uses crypto.getRandomValues() for cryptographically secure random generation. Your data never leaves your browser.
Batch Generation
Generate up to 100 UUIDs at once. Perfect for database seeding, testing, and development workflows.
Multiple Versions
Support for UUID v4 (random) and v1 (timestamp-based). Choose the version that fits your use case.
// ABOUT UUID GENERATION
How UUID Works:
UUID (Universally Unique Identifier) is a 128-bit identifier standardized by RFC 4122. UUID v4 uses 122 random bits providing 2^122 possible values. The 36-character format follows the 8-4-4-4-12 pattern with version and variant bits embedded.
Example:
550e8400-e29b-41d4-a716-446655440000
Common Use Cases:
- >Database primary keys and record identifiers
- >Distributed systems without central coordination
- >Session tokens and correlation IDs
- >File naming and resource identification
- >API request tracing and logging
>> frequently asked questions
Q: What is a UUID?
A: A UUID (Universally Unique Identifier) is a 128-bit number used to uniquely identify information in computer systems. It is also known as GUID (Globally Unique Identifier). The standard format is 8-4-4-4-12 hexadecimal characters separated by hyphens.
Q: What is the difference between UUID v4 and v1?
A: UUID v4 is generated using random or pseudo-random numbers, making it the most commonly used version. UUID v1 is based on the current timestamp and a node identifier, which means it can reveal when and where it was created. V4 is preferred for most applications due to its simplicity and privacy.
Q: What is the probability of UUID collision?
A: UUID v4 has 122 random bits, giving 2^122 (approximately 5.3 x 10^36) possible values. The probability of generating a duplicate is astronomically low — you would need to generate about 2.71 quintillion UUIDs to have a 50% chance of a single collision.
Q: What is the difference between UUID and GUID?
A: UUID and GUID are essentially the same thing. UUID (Universally Unique Identifier) is the term used in most standards and platforms, while GUID (Globally Unique Identifier) is the term commonly used in Microsoft technologies. They follow the same format and generation algorithms.
Q: What is RFC 4122?
A: RFC 4122 is the Internet standard that defines the UUID format, generation algorithms, and namespace conventions. It specifies five versions of UUIDs (v1 through v5) and establishes the 8-4-4-4-12 hexadecimal representation format.
Q: How do I generate a UUID online?
A: Click the [GENERATE] button above. Pick a version (v4 random for most use cases, v1 timestamp-based if you need a chronological component), choose uppercase or lowercase, and set how many you want — you can bulk generate up to 100 at once. UUIDs are created locally in your browser using the Web Crypto API; nothing is sent to any server, so the output is safe to use for production tokens.
Q: How do I generate a UUID in code?
A: Every major platform has a built-in generator:
JavaScript (modern) — crypto.randomUUID()
Node.js — crypto.randomUUID() or uuid npm package
Python — uuid.uuid4()
Java — UUID.randomUUID()
C# / .NET — Guid.NewGuid()
Go — uuid.New() from google/uuid
Rust — Uuid::new_v4() from the uuid crate
PostgreSQL — gen_random_uuid()
SQL Server — NEWID()
Linux shell — uuidgen
Q: What are UUID v1, v4, v5, and v7?
A: v1 is time-based — it encodes the current timestamp plus a MAC/node identifier. Chronologically sortable but leaks when and where it was generated. v3 and v5 are name-based: the UUID is an MD5 (v3) or SHA-1 (v5) hash of a namespace + name, so the same inputs always produce the same UUID. v4 is fully random (122 random bits). Widely used because it is simple, private, and collision-resistant. v6 rearranges v1's fields so the UUID is sortable by time. v7 (RFC 9562, 2024) starts with a 48-bit Unix millisecond timestamp and fills the rest with randomness — the recommended choice for database primary keys because it sorts by creation time while remaining globally unique.
Q: Should I use UUID or auto-increment integers as a primary key?
A: It depends on the workload. Auto-increment integers are smaller (4 or 8 bytes vs. 16) and produce better-packed B-tree indexes, but they require a single source of truth and expose record counts. UUIDs can be generated on any client without coordination, are safe to expose externally, and work naturally with distributed systems. For a heavy-write UUID primary key, prefer UUID v7 or a sequential/COMB UUID — these preserve insertion locality and dramatically reduce index fragmentation compared to random v4.
Q: Are UUIDs case-sensitive?
A: The hexadecimal characters in a UUID are case-insensitive — 550E8400-E29B-41D4-A716-446655440000 and 550e8400-e29b-41d4-a716-446655440000 represent the same identifier. However, display conventions differ: Microsoft tools and Windows APIs use uppercase by default, while Linux, macOS, and most web frameworks use lowercase. Always normalize the case when storing UUIDs as strings to avoid duplicate-looking but logically identical keys.
Q: What does a nil or empty UUID look like?
A: The nil UUID (also called the empty UUID or Guid.Empty in .NET) is 00000000-0000-0000-0000-000000000000 — 32 zero hex digits in the 8-4-4-4-12 format. It is reserved as a sentinel meaning "no UUID" or "not set", and should never be generated as a real identifier.
Q: Are UUIDs truly unique?
A: For practical purposes, yes. UUID v4 draws from 2^122 possible values (≈5.3 × 10^36). To hit a 50% chance of a single collision, you would need to generate about 2.71 quintillion UUIDs — more than the total number of grains of sand on Earth. The theoretical collision possibility is non-zero, but no real system will ever approach it.
Q: What is the difference between RFC 4122 and RFC 9562?
A: RFC 4122 (2005) is the original standard defining UUID format and versions 1–5. RFC 9562 (2024) supersedes it and adds versions 6, 7, and 8 to support modern use cases like time-ordered database primary keys (v7) and application-defined formats (v8). Existing v1–v5 identifiers remain fully compatible.