Tinker Tools

UUID Generator

Generate unique universal identifiers (v1, v4) for your development projects instantly.

Generated Result

Click "Generate New UUIDs" to create UUIDs

What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit number used to uniquely identify information in computer systems. Also known as GUIDs (Globally Unique Identifiers), UUIDs are standardized by the Open Software Foundation (OSF) as part of the Distributed Computing Environment (DCE). The formal definition is described in RFC 4122.

UUIDs are typically represented as 32 hexadecimal digits, displayed in five groups separated by hyphens, in the form 8-4-4-4-12 for a total of 36 characters (32 alphanumeric characters and 4 hyphens). For example: 550e8400-e29b-41d4-a716-446655440000

The probability of generating duplicate UUIDs is so low that it's considered negligible for practical purposes. With version 4 UUIDs (random), there are approximately 5.3 × 10³⁶ (or 2¹²²) possible UUIDs, making collision virtually impossible.

How it works

1

Choose Configuration

Select the UUID version (v1 or v4) and specify the quantity you need. Version 4 is recommended for most use cases as it provides maximum randomness and privacy without exposing hardware information.

2

Click Generate

Press the button to instantly create unique identifiers using cryptographically secure algorithms. All generation happens in your browser - no data is sent to any server.

3

Copy & Use

Use the 'Copy all' feature to grab the results and paste them into your application, database, or wherever you need unique identifiers. Each UUID is guaranteed to be unique.

What Is a UUID?

A UUID — Universally Unique Identifier — is a 128-bit value formatted as 32 hexadecimal characters separated by hyphens in a 8-4-4-4-12 pattern: 550e8400-e29b-41d4-a716-446655440000. Defined by RFC 4122 and its successor RFC 9562, UUIDs provide a way to generate unique identifiers without a central authority or coordination between distributed systems. You do not need to check a database, call an API, or increment a counter. You generate one locally and it is unique — not theoretically unique, but practically unique across all computers that have ever existed and ever will exist, given the astronomically low collision probability.

The term GUID — Globally Unique Identifier — is Microsoft's name for the same thing. GUIDs and UUIDs are identical in structure and behavior. Windows APIs use the GUID terminology while Linux, macOS, and most programming languages use UUID. The difference is purely naming. Under the hood, both are 128-bit values with the same formatting convention and the same version/variant fields. If someone asks you for a GUID, generate a UUID and you are done.

There are several UUID versions, each with different generation strategies. Version 1 combines the current timestamp with the MAC address of the generating machine — it is unique and time-ordered but leaks hardware identity. Version 4 is entirely random — 122 bits of randomness with 6 bits reserved for version and variant markers. This gives you 2^122 possible values, which is approximately 5.3 x 10^36. If you generated one billion UUIDs per second, it would take about 100 years before you had a 50% chance of a single collision. Version 5 produces deterministic UUIDs by hashing a namespace and a name with SHA-1 — the same inputs always produce the same UUID. Version 7, defined in the newer RFC 9562, embeds a Unix timestamp in the most significant bits so UUIDs sort chronologically while keeping the remaining bits random. This makes v7 ideal for database primary keys where index performance depends on insertion order.

Key Features of This UUID Generator

  • UUID v4 Random Generation Generate cryptographically random UUIDs using the Web Crypto API's getRandomValues() method. This pulls randomness from the operating system's entropy pool — /dev/urandom on Linux, CryptGenRandom on Windows — not from Math.random(), which is a pseudorandom number generator unsuitable for unique identifier generation. Every generated UUID has the version nibble set to 4 and the variant bits set to 10, conforming to RFC 4122 section 4.4.
  • UUID v1 Timestamp-Based Generation Version 1 UUIDs encode the current time as a 60-bit timestamp counting 100-nanosecond intervals since October 15, 1582 — the date of the Gregorian calendar reform. Combined with a clock sequence to handle backward time adjustments and a 48-bit node identifier, v1 UUIDs are unique and chronologically ordered. The downside is that the node ID is typically the machine's MAC address, which can be a privacy concern. This tool uses a random node ID instead of your actual MAC address.
  • UUID v5 Name-Based Generation Create deterministic UUIDs from a namespace and a name. The tool concatenates the namespace UUID with your input name and hashes the result with SHA-1, then formats the first 128 bits as a UUID with version 5 markers. The standard defines four namespaces — DNS, URL, OID, and X.500 — or you can supply a custom namespace UUID. Given the same namespace and name, you always get the same UUID. This is perfect for generating stable identifiers from natural keys like email addresses or domain names.
  • UUID v7 Time-Ordered Generation Version 7 is the newest addition, specified in RFC 9562. It places a 48-bit Unix timestamp in milliseconds in the most significant bits, followed by random data in the remaining bits. The result is a UUID that sorts lexicographically by creation time. This property is critical for database performance: B-tree indexes work best with sequential insertions, and random UUIDs like v4 cause excessive page splits and fragmentation. UUID v7 gives you the uniqueness of random UUIDs with the index friendliness of auto-incrementing integers.
  • Bulk Generation Generate up to 1,000 UUIDs at once with a single click. Each UUID appears on its own line, ready to copy into a migration script, a seed file, or a test fixture. Bulk generation is useful when you are pre-allocating identifiers for batch inserts or populating a test database with realistic-looking primary keys. All UUIDs are generated locally using the Web Crypto API, so performance is limited only by your browser's crypto implementation speed.
  • UUID Parsing and Inspection Paste an existing UUID to break it down into its component parts. The tool identifies the version (1, 3, 4, 5, or 7), extracts the variant bits, and — for version 1 — decodes the embedded timestamp into a human-readable date. For version 7, it extracts and displays the Unix timestamp in both milliseconds and ISO 8601 format. This is useful for debugging when you need to know when and how a UUID was generated.

How to Generate a UUID

  1. 1

    Select the UUID Version

    Choose the version that fits your use case. For most applications, v4 is the default — it is simple, random, and universally supported. If you need chronological ordering for database keys, pick v7. If you need reproducible identifiers from known inputs — like generating a UUID for a URL or an email address — choose v5 and enter the appropriate namespace. Version 1 is mainly relevant for legacy systems that expect time-based UUIDs with node identifiers.

  2. 2

    Configure Version-Specific Options

    For UUID v5, you need to provide a namespace and a name. The namespace is itself a UUID — use one of the four standard namespaces (DNS: 6ba7b810-9dad-11d1-80b4-00c04fd430c8, URL: 6ba7b811-9dad-11d1-80b4-00c04fd430c8) or create a custom one for your application. The name is any string. For v1 and v7, no additional input is needed — the timestamp and randomness are generated automatically.

  3. 3

    Set the Output Quantity and Format

    If you need a single UUID, the default is fine. For batch generation, set the count — anything from 2 to 1,000. Choose between the standard hyphenated format (550e8400-e29b-41d4-a716-446655440000), the compact format without hyphens (550e8400e29b41d4a716446655440000), or uppercase if your system requires it. Some databases and ORMs expect a specific format — PostgreSQL's uuid type accepts both hyphenated and compact, while some legacy systems insist on uppercase with braces like {550E8400-E29B-41D4-A716-446655440000}.

  4. 4

    Generate and Verify

    Click generate and review the output. For v5, verify that the same namespace and name always produce the same UUID — this is the whole point of name-based generation. For v7, check that sequentially generated UUIDs sort in chronological order by comparing them as strings. For v4, every click should produce a completely new value with no discernible pattern. The tool displays the version and variant bits so you can confirm the UUID conforms to the specification.

  5. 5

    Copy and Integrate

    Copy the UUID or list of UUIDs and use them in your application. In PostgreSQL, the uuid column type stores UUIDs efficiently as 128-bit binary values — do not use varchar(36), which wastes storage and slows comparisons. In MySQL 8.0+, use the UUID_TO_BIN() function with the swap flag to reorder UUID v1 bytes for better index performance, or just use UUID v7 which sorts correctly without byte swapping. In application code, most languages have native UUID types — java.util.UUID in Java, uuid.UUID in Python, Uuid in Rust — that handle parsing and formatting.

Expert Tips for Working with UUIDs

UUID v4 collision probability is real but absurdly small. With 122 random bits, you need to generate approximately 2.71 x 10^18 UUIDs — 2.71 quintillion — before the probability of a single collision reaches 50%. That is the birthday paradox applied to a 122-bit space. For practical purposes, the probability of a hardware failure or a software bug is many orders of magnitude higher than a UUID collision. Do not add collision-checking logic to your UUID generation code. It adds latency and complexity for zero practical benefit. If you are worried about uniqueness, your concern should be with the quality of your random number generator, not the theoretical collision probability.

When using UUIDs as database primary keys, index performance is a real consideration. UUID v4 values are uniformly distributed across the 128-bit space, which means insertions land at random positions in a B-tree index. This causes page splits — the database has to reorganize index pages to accommodate the new entry, which is slower than appending to the end of a sequential index. UUID v7 solves this by putting the timestamp in the most significant bits, so new UUIDs are always larger than older ones and insertions always go to the end of the index. If you are on a system that does not support v7, you can use a ULID (Universally Unique Lexicographically Sortable Identifier) which has the same time-prefix property in a different format.

Be careful with UUID v1 in production systems. The embedded MAC address reveals which server generated the UUID, which can be a security or privacy concern. Some libraries substitute a random value for the MAC address — this tool does — but not all do. The timestamp in a v1 UUID also tells an observer exactly when the identifier was created, down to 100-nanosecond resolution. If your identifiers are visible to end users — in URLs, API responses, or cookies — this can leak operational details about your infrastructure. UUID v4 and v7 do not have these information leakage problems, which is one more reason to prefer them for user-facing identifiers.

If you need short, URL-friendly identifiers but still want the uniqueness properties of UUIDs, consider encoding them differently. A standard UUID in hex with hyphens is 36 characters. Without hyphens, it is 32 characters. Base64-encoded, a 128-bit UUID becomes 22 characters (with padding stripped). Base62 encoding — using only 0-9, a-z, A-Z — produces a 22-character string without any special characters, which is safe for URLs, filenames, and most database systems. NanoID takes this idea further by generating random identifiers with a configurable alphabet and length, but those are not UUIDs and do not conform to RFC 4122. If interoperability matters, stick with standard UUIDs and just choose a compact encoding.

Related Tools

UUIDs are the identity layer in most modern software systems. The hash generator helps you understand and debug the SHA-1 internals of UUID v5. The password generator creates the random tokens and credentials that sit alongside UUIDs in your security model. And the JSON formatter gives you a clean view of the API responses where these identifiers live. Together, these tools cover the full lifecycle of generating, inspecting, and working with unique identifiers in real applications.

Frequently Asked Questions

Common Use Cases

Database Primary Keys

UUIDs are ideal for distributed databases where multiple systems need to generate IDs independently without coordination or conflict.

Session Identifiers

Create unique session IDs for web applications, ensuring each user session is uniquely tracked without predictable patterns.

Transaction IDs

Generate unique identifiers for financial transactions, orders, or any business process that requires traceable unique references.

Distributed Systems

Enable microservices and distributed applications to generate IDs without central coordination, avoiding bottlenecks and single points of failure.

File Naming

Create unique filenames for uploads, temporary files, or cached resources, preventing naming conflicts in shared storage systems.

API Request IDs

Track individual API requests across distributed systems for debugging, monitoring, and correlation of logs and metrics.

Best Practices

Choose the Right Version

Use UUID v4 for general purposes where privacy is important. Use v1 only when you specifically need chronological ordering or timestamp information embedded in the identifier.

Store Efficiently

When storing UUIDs in databases, use native UUID data types or binary storage (16 bytes) rather than string representation (36 characters) to save space and improve index performance.

Validate Input

Always validate UUID format when accepting them as input. Use regex patterns or built-in validation functions in your programming language to ensure format correctness.

Use Lowercase

Standardize on lowercase representation for UUIDs throughout your application for consistency. While UUIDs are case-insensitive, using a consistent case prevents confusion and comparison issues.

Consider Indexing Strategy

Random UUIDs (v4) can cause index fragmentation in databases due to their random nature. For high-volume insertions, consider using sequential UUIDs (like v1) or database-specific solutions like PostgreSQL's uuid-ossp extension with uuid_generate_v1mc().

Recommended Tools