Free No sign-up Client-side

UUID Generator

Generate cryptographically random UUID v4 strings — one at a time or in bulk up to 100. Copy individually or all at once. Everything runs in your browser.

Quantity

Format

5 UUID v4s generated
17ac6fcf8-9234-45c2-a51a-ee056ec4e7ec
2bd098337-72ce-4f99-bee5-4e821f26cb96
3fbd50e45-7383-468e-b520-8d675f3ce488
4f9b281b4-b28d-41b1-88b1-333ca0a574ff
58443d99a-9b18-4dc9-9b68-9b95cd160635

v4

Version

122

Random bits

36

Characters

What is a UUID?

A UUID (Universally Unique Identifier), also called a GUID (Globally Unique Identifier), is a 128-bit identifier formatted as 32 hexadecimal characters grouped into five sections: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. The standard is defined in RFC 4122.

UUID v4 is the most commonly used variant — the 122 bits of randomness are generated by a cryptographically secure random number generator. The probability of generating two identical v4 UUIDs is astronomically small: you would need to generate over 2 billion UUIDs per second for roughly 85 years before having a 50% chance of a single collision.

UUIDs are used as primary keys in databases, identifiers in distributed systems, file names, session tokens, correlation IDs in logs, and anywhere a unique identifier is needed without a central coordinator.

How to generate UUIDs

  1. 1

    Choose quantity

    Select how many UUIDs you need — 1, 5, 10, 25, 50, or 100.

  2. 2

    Set format options

    Toggle uppercase or lowercase, and choose whether to include hyphens.

  3. 3

    Generate and copy

    Click Generate. Copy any individual UUID or use Copy All to grab the entire list.

Why UUIDs are the standard for unique IDs

No central coordinator needed

Unlike auto-increment integers, UUIDs can be generated by any service in a distributed system without risk of collision — no database round-trip required.

Privacy by design

Unlike sequential IDs, UUIDs reveal nothing about the order of record creation, making it impossible for users to enumerate other records by guessing adjacent IDs.

Works offline

Mobile apps and offline-first systems can create records with UUID primary keys before syncing to the server, with no conflict on sync.

Universal support

Every major language, database (PostgreSQL, MySQL, MongoDB), and framework has native UUID support. PostgreSQL even has a dedicated uuid column type.

UUID versions — which one should you use?

  • v1 — time-based. Encodes the current timestamp and MAC address. Sortable by time but leaks host identity. Avoid in public-facing systems.
  • v3 — MD5 hash of a namespace + name. Deterministic: same input always produces the same UUID. Useful for content-addressed identifiers.
  • v4 — random. 122 bits of cryptographic randomness. The default choice for database primary keys and most general-purpose use. This is what this tool generates.
  • v5 — SHA-1 hash of a namespace + name. Like v3 but using SHA-1. Prefer v5 over v3 for new code.
  • v7 (new) — time-ordered random UUID. Combines millisecond timestamp prefix with random bits. Lexicographically sortable, making it ideal for database primary keys (better index locality than v4). Gaining adoption in databases like PostgreSQL 17.

UUID vs ULID vs NanoID

  • UUID v4 — 36 chars with hyphens, universally supported, cryptographically random. The safe default.
  • ULID — 26 chars, time-sortable, Crockford Base32 encoded. Better database index performance than v4 UUIDs. No native browser API — needs a library.
  • NanoID — customisable length (default 21 chars), URL-safe, smaller than UUID. Slightly smaller collision probability per character than UUID. Needs a library.
  • UUID v7 — 36 chars like v4 but time-ordered. Best of both worlds — native standard with good index locality. Use if your database/ORM supports it.

Frequently asked questions

In practice, yes. A UUID v4 has 122 bits of randomness. The probability of two randomly generated UUIDs colliding is 1 in 2^122 — roughly 5.3 × 10^36. You would need to generate about 2.7 quintillion UUIDs to have even a 50% chance of a collision. For all practical purposes, treat them as unique.

Browser/Node.js 19+: crypto.randomUUID(). Node.js <19: import { v4 as uuidv4 } from 'uuid'. Python: import uuid; str(uuid.uuid4()). Go: github.com/google/uuid package. PostgreSQL: gen_random_uuid() or uuid_generate_v4() with the uuid-ossp extension.

Yes, with caveats. UUID v4 is random, which causes fragmented B-tree index pages and slower inserts at scale compared to sequential integers. Solutions: use UUID v7 (time-ordered), use PostgreSQL's native UUID type (not VARCHAR), or store UUIDs as binary(16) in MySQL for half the storage.

They refer to the same thing. UUID is the RFC 4122 standard term. GUID (Globally Unique Identifier) is Microsoft's equivalent — same format, same algorithm. The terms are used interchangeably.

A UUID v4 has 122 bits of randomness — equivalent to a 15-character random alphanumeric string. This is enough for most non-critical tokens, but for security tokens (session IDs, API keys, password reset links), use crypto.getRandomValues() to generate 32 bytes (256 bits) and encode as hex or Base64. The extra entropy matters for high-value targets.

Need another tool?

Browse the full toolbox or dig into the blog for the engineering behind it.

Call UsWhatsApp