ToolBook
Support us on Ko-fi
Help us keep this free, forever

UUID / GUID Generator

How to use UUID Generator

Generate one or many UUIDs with your preferred format.

  1. Set the count

    Use the slider or number input to choose how many UUIDs to generate — from 1 up to 100.

  2. Choose format options

    Toggle uppercase for capital hex, disable hyphens for a compact 32-character string, or enable braces to get the {UUID} format used in .NET and C# configuration.

  3. Generate

    Click the Generate button or change any option — a fresh set is produced instantly.

  4. Copy

    Click the copy icon beside any individual UUID, or use Copy All to get the entire list newline-separated.

Frequently asked questions

What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit label used to uniquely identify information without central coordination. They are written as 32 hexadecimal digits in the form 8-4-4-4-12, e.g. 550e8400-e29b-41d4-a716-446655440000.

What is the difference between UUID v1 and v4?

v4 is randomly generated (122 random bits) and by far the most widely used today. v1 encodes the current timestamp and the MAC address of the generating machine, making it sortable but potentially leaking host information.

Are UUIDs truly unique?

v4 UUIDs have 2¹²² possible values (~5.3×10³⁶). The probability of generating two identical UUIDs is so astronomically small that for practical purposes they are unique.

What is a GUID?

GUID (Globally Unique Identifier) is the Microsoft name for the same concept. A GUID and a UUID are the same format and interchangeable in practice.

Can I use these UUIDs in a database?

Yes. UUIDs are commonly used as primary keys in databases. If you are using PostgreSQL the uuid type stores them efficiently as 16 bytes. For MySQL the binary(16) type is recommended over varchar(36) for performance.

Why would I generate UUIDs in bulk?

Bulk generation is useful for seeding a database, pre-allocating IDs in an import file, testing uniqueness constraints, or generating multiple tokens for an API batch operation.

What is UUID v7 and when should I use it?

UUID v7 is a newer format that encodes a millisecond-precision timestamp in the high bits, making it monotonically increasing and friendly for database index locality. If your database uses UUIDs as primary keys and suffers from page splits or slow inserts, v7 is worth considering. The v4 generator here produces random UUIDs; v7 support is on the roadmap.

Which UUID format should I use in .NET or C#?

The .NET System.Guid type traditionally displays UUIDs wrapped in braces, for example {550e8400-e29b-41d4-a716-446655440000}. Enable the Braces toggle in this tool to generate UUIDs in that format, ready to paste directly into C# code or configuration files.

Should I include hyphens when using a UUID in a URL?

Hyphens are valid in URLs and do not need percent-encoding, so UUID slugs like /items/550e8400-e29b-41d4-a716-446655440000 work fine. If you prefer shorter paths, disable hyphens to get the compact 32-character hex form. Both are semantically equivalent.

UUIDs in practice: versioning, databases, and collision math

When to use v4, why 2¹²² is effectively infinite, and the performance trade-offs of UUID primary keys.

What a UUID actually is

A UUID (Universally Unique Identifier, also called GUID on Windows) is a 128-bit number represented as 32 hex digits in five groups separated by hyphens: 8-4-4-4-12.

550e8400-e29b-41d4-a716-446655440000

The format is defined by RFC 4122. The third group encodes the version (4 in 41d4), and the fourth group encodes the variant (the leading bits of a716 tell you this is RFC 4122 compliant).

UUID v4: the one you should use

Version 4 UUIDs are randomly generated. 122 of the 128 bits are random (6 bits encode version and variant). With crypto.randomUUID() the source of randomness is the OS-level cryptographically secure random number generator — the same one used for TLS session keys.

The probability of generating two identical v4 UUIDs in your lifetime, even generating millions per day, rounds to zero. The birthday paradox math: you need to generate roughly 2.7 × 10¹⁸ UUIDs before the collision probability reaches 50%.

UUID v1: useful for event ordering

Version 1 encodes the current timestamp (in 100-nanosecond intervals since 15 October 1582) plus a node ID (traditionally the MAC address). Because they include the time, v1 UUIDs from the same machine can be chronologically sorted.

The downside: the MAC address reveals the generating machine, which is a privacy concern. Some implementations substitute a random node ID to avoid this.

Choosing UUID vs auto-increment for primary keys

Auto-increment integers are fine for tables with a single primary database. UUIDs are better when:

  • Merging data from multiple sources — two databases generating ID 1, 2, 3 will collide. UUIDs never do.
  • Client-side ID generation — the client can create the ID before the server acknowledges the write, enabling optimistic UI updates.
  • Hiding sequence information — auto-increment IDs leak how many rows exist, making enumeration attacks trivial.

The downside of UUID primary keys is storage and index size. A UUID stored as varchar(36) takes 36 bytes; a bigint takes 8. For read-heavy workloads on large tables, consider storing as binary(16) or using UUID v7 (time-ordered, available in newer databases) which has better index locality.

Formatting conventions

Some systems expect uppercase (550E8400-E29B-41D4-A716-446655440000), some lowercase. Some strip hyphens for compact 32-character storage (550e8400e29b41d4a716446655440000). The generator here gives you both options.

For PostgreSQL use the uuid type. For MySQL use binary(16) and convert with UUID_TO_BIN() / BIN_TO_UUID(). For MongoDB, BSON UUIDs are stored natively.