UUID · Database

UUID Generator Online: Generate v4, v7, and Bulk UUIDs

Everything about UUIDs — what they are, v4 vs v7, when to use each, and how to generate them for free.

What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit identifier formatted as 32 hex characters in 5 groups:

550e8400-e29b-41d4-a716-446655440000

UUIDs are used as primary keys in databases, session tokens, request IDs, and anywhere you need a globally unique identifier without a central coordinator.

UUID v4 vs UUID v7

UUID v4UUID v7
GenerationRandomTime-ordered + random
SortableNoYes (monotonically increasing)
Database performanceWorse (random inserts)Better (sequential inserts)
Use caseGeneral purposeDatabase primary keys
StandardRFC 4122RFC 9562 (2024)

When to Use UUID v7

UUID v7 is the modern choice for database primary keys. Because it's time-ordered, new rows are always inserted at the end of the index — dramatically better performance than v4's random inserts which cause page splits.

Use v7 for:

Use v4 for:

Generate UUIDs in Different Languages

# JavaScript (browser)
crypto.randomUUID() // v4

# Node.js
const { v4: uuidv4 } = require('uuid');
uuidv4();

# Python
import uuid
str(uuid.uuid4())

# Go
import "github.com/google/uuid"
uuid.New().String()

# PostgreSQL
SELECT gen_random_uuid(); -- v4
SELECT uuid_generate_v4(); -- v4 (requires uuid-ossp)

Bulk UUID Generation

Our UUID Generator supports bulk generation — generate 1 to 100 UUIDs at once and copy them all. Useful for seeding databases, generating test data, or creating batch identifiers.

UUID v7 Generator

We also have a dedicated UUID v7 Generator that uses the uuidv7 library to generate properly formatted time-ordered UUIDs. Copy one or generate a batch.

privacy

Everything runs in your browser.

Format JSON, decode JWT, count words, generate hashes, and convert text without uploading your input.

workflow

Bookmark once, reuse daily.

A compact toolbox for recurring developer, writing, SEO, and AI-content checks.

rootnest

Part of the RootNest product stack.

Use it with OnePost, 周报侠, 内容搭子Pro, and other small focused tools.