PublicSoftTools
Tools16 min read·PublicSoftTools Team·May 2026

UUID Generator Online — Free v1 & v4 GUID Tool

The free UUID Generator creates RFC 4122-compliant unique identifiers in your browser — no server, no signup. Choose UUID v4 for fully random IDs or UUID v1 for timestamp-ordered ones, and bulk-generate up to 100 at once with a single click.

What Is a UUID?

A UUID (Universally Unique Identifier) — also called a GUID (Globally Unique Identifier) by Microsoft — is a 128-bit number used to identify resources uniquely across distributed systems without a central authority. Standardized as RFC 4122 (IETF 2005) and later updated by RFC 9562 (2024), the format is 32 hexadecimal digits arranged in five groups separated by hyphens:

xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx

The M digit encodes the version (1–8) and the N digit encodes the variant (always 8, 9, a, or b for RFC 4122 UUIDs). The remaining 122 bits carry the actual unique data.

UUID Versions

VersionGeneration methodSortable?Use case
v1Timestamp + MAC address + clock sequenceYes (by creation time)Database PKs with high write throughput
v3MD5 hash of name + namespaceNoDeterministic IDs from names (legacy)
v4122 bits of cryptographic randomnessNoGeneral use, API IDs, session tokens
v5SHA-1 hash of name + namespaceNoDeterministic IDs from names (preferred over v3)
v7Unix millisecond timestamp + random bitsYes (ms precision)Database PKs (RFC 9562, PostgreSQL 17+ native)
v8Custom data in user-defined formatDependsVendor-specific extensions

How to Use the UUID Generator

  1. Open the UUID Generator
  2. Select UUID v4 (random) or UUID v1 (timestamp-based)
  3. Set the count to 1–100 to generate multiple UUIDs at once
  4. Enable Uppercase to output A–F in capitals (GUID style)
  5. Click Generate — all UUIDs appear instantly
  6. Click Copy All to copy newline-separated output to clipboard

UUID v1 vs UUID v4 — Comparison

PropertyUUID v1UUID v4
Generation methodTimestamp + clock sequence + node122 bits of cryptographic randomness
Time-ordered?Yes — UUIDs generated later sort laterNo — completely random order
PrivacyEncodes creation time; node can reveal MAC addressNo information leaked
B-tree index performanceGood — sequential inserts avoid page splitsPoor at high volume — random splits cause fragmentation
Best forDatabase PKs with high insert rates, loggingAPI IDs, session tokens, general purpose

Using UUIDs as Database Primary Keys

Why developers use UUIDs over auto-increment integers

Auto-incrementing integers are sequential — exposing them in URLs (/orders/1042) reveals your record count and enables enumeration attacks. UUID-based URLs (/orders/a1b2c3d4-…) are opaque and carry no information about neighboring records.

UUIDs also enable distributed ID generation: multiple application servers or microservices can generate IDs independently without coordinating with a central database sequence. Each node generates locally and inserts without collision risk.

Index performance and UUID v4 fragmentation

The main drawback of UUID v4 as a primary key is B-tree index fragmentation. Databases store primary keys in sorted order inside index pages. A random UUID lands somewhere in the middle of an existing page, forcing page splits. Over millions of rows this causes significant write amplification.

Solutions:

Storage format in SQL databases

DatabaseNative UUID typeCompact alternative
PostgreSQLUUID (16 bytes)Native type is already optimal
MySQL 8+CHAR(36) or UUID typeBINARY(16) saves 20 bytes per row
SQLiteNo native type — store as TEXTBLOB (16 bytes) for compactness
SQL ServerUNIQUEIDENTIFIER (16 bytes)Use NEWSEQUENTIALID() for ordered inserts

Generating UUIDs in Code

JavaScript / Node.js

// Browser or Node.js 15+
const id = crypto.randomUUID();
// → "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"

// Older Node.js — use the 'uuid' package
const { v4: uuidv4, v1: uuidv1, v7: uuidv7 } = require('uuid');
const id = uuidv4();
const ordered = uuidv7();  // time-ordered, recommended for DB keys

Python

import uuid

# UUID v4 (random)
id = uuid.uuid4()
print(str(id))   # "a1b2c3d4-e5f6-4a7b-8c9d-0e1f2a3b4c5d"

# UUID v1 (timestamp)
ordered_id = uuid.uuid1()

# UUID v5 (deterministic — SHA-1 hash)
name_based = uuid.uuid5(uuid.NAMESPACE_URL, "https://example.com")

Go

import "github.com/google/uuid"

id := uuid.New()                  // v4
idStr := id.String()              // "a1b2c3d4-..."

// v7 (time-ordered, recommended for DB keys)
idV7, err := uuid.NewV7()
fmt.Println(idV7.String())

SQL

-- PostgreSQL 13+
INSERT INTO users (id, name) VALUES (gen_random_uuid(), 'Alice');

-- PostgreSQL 17+ (UUID v7, time-ordered)
INSERT INTO users (id, name) VALUES (uuidv7(), 'Alice');

-- MySQL 8+
INSERT INTO users (id, name) VALUES (UUID(), 'Alice');

-- SQL Server
INSERT INTO users (id, name) VALUES (NEWID(), 'Alice');
-- Or sequential: NEWSEQUENTIALID() for better index performance

Advanced Workflows

Bulk generation for test data

Set the count to 100 and generate 100 UUIDs in one click. The newline-separated output pastes directly into SQL seed scripts or JSON fixtures. For a test database: generate 50 user IDs, 100 product IDs, and 200 order IDs without leaving the browser.

Idempotency keys for payment APIs

Stripe, Adyen, and other payment processors accept an idempotency key with each request. If the request is retried due to a network error, the same key ensures the charge is only processed once. Generate a UUID v4 per payment attempt, store it with the pending transaction record, and send it as the Idempotency-Key header.

Deterministic UUIDs with v5

UUID v5 generates the same UUID for the same input every time (SHA-1 hash of a namespace + name). Use this when you need a stable ID derived from a known value:uuid5(NAMESPACE_URL, “https://example.com/products/widget”)always produces the same UUID for that URL, without storing a mapping.

Common Questions

Can two UUIDs ever be the same?

UUID v4 has 2¹²² ≈ 5.3 × 10³⁶ possible values. Generating a duplicate requires roughly 2.7 × 10¹⁸ UUIDs — far beyond any practical system. Add a UNIQUE constraint as a safety net, but collision is not a realistic concern for applications generating fewer than hundreds of billions of records.

Is UUID the same as GUID?

Yes — GUID is Microsoft's term for the same concept. The format is identical; GUIDs are sometimes displayed in uppercase with surrounding braces:{A1B2C3D4-E5F6-4A7B-8C9D-0E1F2A3B4C5D}. The uppercase toggle in the tool handles the formatting difference.

What is the difference between UUID and ULID?

ULID (Universally Unique Lexicographically Sortable Identifier) encodes the timestamp in the first 10 characters using Crockford Base32, making ULIDs sort in creation order and URL-safe (no hyphens). Unlike UUID v1, the timestamp is always in the most-significant bits. ULIDs are gaining adoption as a database-friendly alternative to UUID v4, though UUID v7 (RFC 9562) now provides a standardized time-ordered UUID option.

Generate UUIDs Free Online

UUID v4, v1, bulk up to 100, uppercase GUID style — all browser-based, no signup required.

Open UUID Generator