UUID Generator

Generate random UUID v4 (GUID) identifiers. Click to generate, then copy to clipboard. Supports bulk generation for testing.

Click Generate to create a UUID

What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit number used to uniquely identify information in computer systems. The standard format is 32 hexadecimal digits displayed in five groups separated by hyphens: 550e8400-e29b-41d4-a716-446655440000. UUIDs are also known as GUIDs (Globally Unique Identifiers) in Microsoft terminology.

UUID Versions

  • UUID v1: Based on timestamp and MAC address. Sortable but reveals machine identity and creation time.
  • UUID v4: Randomly generated. Most commonly used — no identifiable information, purely random. This is what our generator produces.
  • UUID v5: Name-based using SHA-1 hashing. Deterministic — same namespace + name always produces the same UUID.

Common Use Cases

  • Database primary keys: UUIDs eliminate ID collisions in distributed systems and simplify merging records across databases.
  • File names: Use UUIDs for temporary filenames or user uploads to avoid naming conflicts.
  • API tokens: Generate unique identifiers for session tokens, request IDs, or idempotency keys.
  • Testing: Quickly generate unique test data — user IDs, order numbers, or transaction references.
  • Distributed systems: UUIDs let multiple services generate IDs independently without coordination.

Frequently Asked Questions

Are UUIDs really unique?

UUID v4 generates 122 random bits. The probability of collision is approximately 1 in 2.7 × 1018 — for context, you'd need to generate 1 billion UUIDs per second for 85 years to have a 50% chance of a single collision. For practical purposes, they are unique.

UUID vs. auto-increment ID — which should I use?

Auto-increment IDs are smaller and faster for indexing but cause issues in distributed systems and expose record counts. UUIDs are larger (16 bytes) but work everywhere, hide record counts, and enable offline ID generation. Use UUIDs for distributed/multi-tenant systems; use auto-increment for simple single-database apps.

Is this tool's output cryptographically secure?

Yes. UUID v4 generation uses crypto.getRandomValues() — a cryptographically secure random number generator built into all modern browsers. The generated UUIDs are suitable for use as tokens, identifiers, and keys.

Does it work offline?

Yes. All UUID generation happens in your browser — no data is sent to any server. The tool works offline once the page is loaded.

How do I use UUIDs as primary keys in PostgreSQL?

PostgreSQL has native uuid column type. Create a table with CREATE TABLE users (id UUID PRIMARY KEY DEFAULT gen_random_uuid()). Unlike auto-increment integers, UUIDs avoid ID collisions in distributed setups and don't expose record counts. The 16-byte storage overhead is negligible for most applications.