UUID Generator

Generate UUID v4 values instantly. Single or bulk. All generation happens in your browser — nothing is sent to a server.

UUID v4
Bulk Generation
Generate multiple UUIDs at once
Count

UUID (Universally Unique Identifier, RFC 4122) is a 128-bit identifier displayed as 32 hexadecimal digits in five groups: xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx. UUID v4 generates all 122 variable bits randomly, making it the standard choice for unique IDs that require no central registry.

What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit label used to identify information in computer systems. The standard format is 32 hexadecimal digits displayed in five groups separated by hyphens:

xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx

UUID v4 is the most widely used version. All 122 variable bits are randomly generated, making collisions statistically impossible in practice. It is used for database primary keys, session tokens, file names, and distributed system IDs.

UUID v4 vs other versions

  • v1 — Based on timestamp + MAC address. Predictable, not recommended for security-sensitive IDs.
  • v3 / v5 — Deterministic, namespace-based (MD5 or SHA-1). Used when you need the same ID for the same input.
  • v4 — Randomly generated. The default choice for database keys and unique tokens.
  • v7 — Timestamp-sortable random UUID. Increasingly used in databases for index efficiency.

Use cases

  • Database primary keys (PostgreSQL uuid type, MongoDB ObjectId alternative)
  • REST API resource identifiers (/users/550e8400-e29b-41d4-a716-446655440000)
  • Session and token IDs
  • Idempotency keys for payment APIs
  • File names for uploaded assets

Frequently Asked Questions

What is a UUID v4?

UUID v4 is a randomly generated 128-bit identifier formatted as five hyphen-separated groups of hexadecimal characters (e.g. 550e8400-e29b-41d4-a716-446655440000). All 122 variable bits are randomly generated, making it the most commonly used UUID version for generating unique IDs without a central registry.

Are the generated UUIDs truly unique?

Yes. This tool uses crypto.randomUUID(), which relies on the browser's cryptographically secure random number generator. The theoretical chance of generating two identical UUID v4 values is approximately 1 in 5.3 × 10³⁶ — effectively zero in any practical scenario.

What is the difference between UUID and GUID?

GUID (Globally Unique Identifier) is Microsoft's name for the same concept. UUID and GUID refer to the same 128-bit identifier format defined by RFC 4122. The terms are interchangeable in practice.

What is UUID v7 and how is it different from v4?

UUID v7 encodes a millisecond-precision Unix timestamp in the first 48 bits, making UUIDs time-sortable. This improves database index performance because new rows are always appended at the end of an index rather than inserted in random positions. Use v7 when you need sortable IDs; use v4 when ordering does not matter. Read more: UUID v4 vs v7 explained.

Can I use a UUID as a database primary key?

Yes. UUID v4 is widely used as a primary key in PostgreSQL (uuid type), MySQL, and MongoDB. The main trade-off is index fragmentation — because v4 values are random, each insert goes to a random B-tree position, which can slow inserts at high volume. UUID v7 avoids this by being time-sortable.

Is my data sent to a server?

No. UUID generation happens entirely in your browser using the native crypto.randomUUID() API. Nothing is transmitted to any server.

Last updated: May 2026