If you have spent any time in software development, you have seen them: 550e8400-e29b-41d4-a716-446655440000. A UUID (Universally Unique Identifier) is a 128-bit number used to uniquely identify something — a database record, a file, an API request — without needing a central authority to assign it. Every system can generate its own UUIDs independently, and the probability of two ever being the same is astronomically small.

UUID anatomy: what each part means

Diagram breaking down a UUID v4 into its 5 groups of characters with colour coding showing the version marker and variant bits
A UUID v4 is 32 random hex characters in 8-4-4-4-12 format. The 13th character is always 4 (version) and the 17th is always 8, 9, a, or b (variant).

A UUID is displayed as 32 hexadecimal characters grouped in the format 8-4-4-4-12, giving 36 total characters including hyphens. In UUID version 4:

  • The 13th character is always 4 — this is the version marker
  • The 17th character is always 8, 9, a, or b — this is the variant marker
  • All other characters are random hexadecimal digits

This means there are 2¹²² (~5.3 × 10³⁶) possible UUID v4 values. Generating 1 billion per second for 100 years would still give less than a 1-in-a-billion chance of a collision. For practical purposes, treat them as globally unique.

How to generate UUIDs — step by step

  1. Open the ToolFlow UUID Generator
  2. Enter how many UUIDs you need (1 to 100)
  3. Click Generate
  4. Click Copy All to copy the list
Security note: UUIDs are generated using crypto.getRandomValues() — your browser's cryptographically secure random number generator. Nothing is sent to any server.

Common uses for UUIDs in software

Six common UUID use cases: database primary keys, file naming, API request IDs, test data seeding, message queues, and analytics event tracking
UUIDs solve the uniqueness problem across distributed systems without coordination.
  • Database primary keys — replace auto-increment integers when records need to be globally unique across distributed systems or merged databases
  • File naming — name uploaded files with UUIDs to prevent naming collisions, overwriting, and enumeration attacks
  • API request IDs — attach a UUID to every API request for distributed tracing and idempotent retry logic
  • Test data seeding — generate IDs for test fixtures without running a database or hitting a sequence counter
  • Message queues — assign each event a UUID for idempotent processing in Kafka, SQS, or RabbitMQ
  • Analytics events — prevent double-counting on retry by giving each event a unique ID

UUID vs auto-increment: which should you use?

Comparison of UUID v4 versus auto-increment integer primary keys showing trade-offs in storage, performance, security and distributed systems
Both are valid — the right choice depends on your system's scale and architecture.

Auto-increment integers are smaller (4–8 bytes vs 16 bytes) and faster for B-tree index inserts because they are sequential. UUIDs are globally unique, safe to generate client-side, and do not expose record counts. The right choice depends on your system:

  • Use UUID v4 for distributed systems, multi-tenant apps, public APIs, and file naming
  • Use UUID v7 (time-ordered random) if you need UUIDs as database primary keys with good index performance
  • Use auto-increment for simple single-database applications, admin tools, and internal systems where read performance matters most

Generate UUIDs now — free, no account

Generate 1 to 100 UUID v4 strings. Cryptographically random. Copy all with one click.

Frequently Asked Questions

Are UUID v4s truly unique?

Statistically yes. There are 2¹²² possible values — generating 1 billion per second for 100 years gives less than a 1-in-a-billion chance of a collision. For all practical purposes, treat them as globally unique.

Are these UUIDs cryptographically secure?

Yes — generation uses crypto.getRandomValues(), which uses your operating system's cryptographically secure random number generator. This is the same source used for cryptographic keys.

What is the difference between UUID and GUID?

GUID (Globally Unique Identifier) is Microsoft's name for the same concept. They are interchangeable — both follow the RFC 4122 specification and the same 8-4-4-4-12 format.

Can I use these UUIDs in production?

Yes for most use cases. For security-sensitive contexts (session tokens, auth codes), generate UUIDs server-side rather than trusting client-generated values.

What is UUID v7 and when should I use it?

UUID v7 is a newer standard that combines a millisecond timestamp prefix with random bits. This makes UUIDs time-sortable and dramatically improves B-tree index performance in databases. Use v7 when you need UUIDs as database primary keys at scale. Use v4 for everything else.

Why does the 13th character have to be 4?

The 13th character encodes the UUID version. Version 4 (random) is indicated by a 4 at that position. This is part of the RFC 4122 specification that defines the UUID standard.

← All articles

More free tool guides