KEHEM IT LogoKEHEM IT / Tools
RFC 4122 & RFC 9562 Compliant · Cryptographically Secure Web Crypto API

Free UUID Generator Online

Generate random UUID v4 or time-sorted UUID v7 identifiers instantly. 100% client-side, zero tracking, bulk export.

Instant UUID v4 Random

Generating...

Bulk UUID / GUID Generator

Generate up to 1,000 UUIDs with custom formatting, casing, and download formats.

Count 0
Characters 0
Formatting

What is a UUID (Universally Unique Identifier)?

A UUID (Universally Unique Identifier), also known as a GUID (Globally Unique Identifier) in the Microsoft ecosystem, is a 128-bit number standardized under RFC 4122 and RFC 9562.

In canonical string form, a UUID is represented as 32 hexadecimal digits displayed in five groups separated by hyphens: 8-4-4-4-12 (for a total of 36 characters), such as:

550e8400-e29b-41d4-a716-446655440000

UUID v4 vs UUID v7: The 2026 Database Benchmark

For over two decades, UUID v4 was the default standard for generating random identifiers. However, because UUID v4 is completely random, inserting new rows into PostgreSQL, MySQL, or SQLite B-tree indexes causes severe index fragmentation and cache thrashing as tables scale to millions of rows.

FeatureUUID v4 (Random)UUID v7 (Time-Ordered)
StandardRFC 4122 (2005)RFC 9562 (2024)
Generation Basis122 random bits48-bit Unix timestamp + 74 random bits
Sortability❌ Not sortable✅ Naturally sortable by creation time
Database PerformanceSlow on high-write tables (B-tree rebalancing)⚡ 4x faster inserts (appends to end of index)
Best Use CasePublic tokens, session IDs, API noncesDatabase Primary Keys (PostgreSQL, MySQL)

Complete UUID Versions Matrix (v1 through v7)

VersionAlgorithmPrimary Use CaseSecurity / Privacy Notes
UUID v1MAC address & 100ns timestampLegacy distributed systems⚠️ Leaks MAC address and hardware identity
UUID v3MD5 hash of namespace & stringDeterministic ID generationMD5 is cryptographically broken; use v5
UUID v4CSPRNG Pseudo-RandomGeneral-purpose web & software IDs✅ 100% secure, zero metadata leak
UUID v5SHA-1 hash of namespace & stringDeterministic naming (URL, DNS)Safe for reproducible name hashing
UUID v6Reordered v1 timestampSortable legacy compatibilitySuperseded by UUID v7
UUID v7Unix millisecond timestamp + randomModern Database Primary Keys✅ Excellent security & index speed

How to Generate UUIDs in 10 Programming Languages

Copy-paste code snippets for your backend stack:

Python (UUID v4)
import uuid

# Generate a random UUID v4
uid = uuid.uuid4()
print(str(uid))  # "550e8400-e29b-41d4-a716-446655440000"
JavaScript / TypeScript (Web Crypto)
// Native Web Crypto API (Browser & Node 19+)
const id = crypto.randomUUID();
console.log(id);
Django Model (Python)
import uuid
from django.db import models

class Order(models.Model):
    id = models.UUIDField(primary_key=True, default=uuid.uuid4, editable=False)
PostgreSQL (SQL)
-- Built-in function in PostgreSQL 13+
SELECT gen_random_uuid();

-- In table definition:
id UUID PRIMARY KEY DEFAULT gen_random_uuid()
Go (Golang)
package main
import (
    "fmt"
    "github.com/google/uuid"
)

func main() {
    id := uuid.NewString()
    fmt.Println(id)
}
Rust
use uuid::Uuid;

fn main() {
    let id = Uuid::new_v4();
    println!("{}", id);
}
Java
import java.util.UUID;

UUID uuid = UUID.randomUUID();
System.out.println(uuid.toString());
C# / .NET (GUID)
using System;

Guid guid = Guid.NewGuid();
Console.WriteLine(guid.ToString());

Collision Probability Math: Can UUIDs Repeat?

A UUID v4 contains 122 bits of pure random entropy. The total number of possible UUIDs is:

2122 ≈ 5.3 × 1036 (5.3 Undecillion Unique Keys)

To put this in perspective: if every human on Earth generated 1 million UUIDs per second for the next 100 years, the probability of generating a single duplicate would still be less than 0.00000000001%.

Frequently Asked Questions

What is a UUID?

A UUID (Universally Unique Identifier) is a standardized 128-bit number used in software engineering to identify records across distributed databases without a central authority.

What is the difference between UUID and GUID?

GUID (Globally Unique Identifier) is Microsoft's naming for the UUID standard. In practice, they are identical 128-bit values formatted with 36 hexadecimal characters.

Should I use UUIDs as database primary keys?

For modern high-scale databases, use UUID v7. Because UUID v7 contains a Unix timestamp prefix, it inserts sequentially into B-tree indexes, avoiding the memory fragmentation caused by random UUID v4.

Does this tool send generated UUIDs to a server?

No. All UUIDs are generated 100% locally in your browser using the cryptographically secure Web Crypto API. No data is stored, tracked, or sent across the network.

Can I remove hyphens or convert to uppercase?

Yes. Use the formatting checkboxes above to toggle uppercase, remove hyphens (32-character compact string), or wrap in JSON quotes/braces.