Guide · Free · Updated Nov 18, 2026

UUID Generator Guide — v1, v4 & Uses

A UUID is a 128-bit ID that is practically unique — no central counter, no clashes, no coordination. This guide explains what UUIDs are, the difference between v1 and v4, and where developers use them.

What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit ID written as 36 characters — for example 550e8400-e29b-41d4-a716-446655440000. It is so unlikely that two random UUIDs ever match that developers use them as database keys, file names, session IDs and API identifiers without a central counter. The point is decentralisation: any device, anywhere, can generate an ID that will not clash with any other ID generated anywhere else. Our UUID Generator creates them in your browser, one at a time or in batches of up to 100.

UUID v4 — random

UUID v4 is the usual choice: 122 random bits, generated with secure randomness. The "4" in the version position — the 13th character — marks it as v4. Because the bits are random, two v4 UUIDs will essentially never match: the chance of a collision is so small that you would need to generate billions of UUIDs per second for a century to expect one. Use v4 whenever you need a fresh, unpredictable ID — for a database row, a file name, a session token or an API key.

UUID v1 — time-based

UUID v1 embeds the current date and time plus a device identifier, so it is unique and also sortable by time — IDs generated later sort after IDs generated earlier, which is useful for database indexes. The "1" in the version position marks it as v1. The trade-off is privacy: a v1 UUID reveals when it was created and, in the original design, the device's MAC address. Modern generators use a random node instead of the real MAC address. Use v1 when time-ordering matters, and v4 when it does not.

How to read a UUID

A UUID has five groups separated by hyphens: 8-4-4-4-12 characters. The first group is time or random data, the second and third are more time or random data, the fourth starts with the variant (usually 8, 9, a or b), and the fifth is the node. In 550e8400-e29b-41d4-a716-446655440000, the "4" in "41d4" tells you it is v4, and the "a" in "a716" tells you the variant. You do not need to read a UUID by eye — the validator in the generator decodes the version, variant and, for v1, the exact date and time hidden inside it.

Formatting: hyphens, case and braces

The same UUID can be written several ways: with hyphens (550e8400-e29b-41d4-a716-446655440000), without hyphens (550e8400e29b41d4a716446655440000), in lowercase or UPPERCASE, and with or without braces {550e8400-e29b-41d4-a716-446655440000}. Only the formatting differs — the 128-bit value is the same, and most systems accept any of them. Use the hyphenated lowercase form in text and documents, the compact form when a system asks for 32 characters, and braces when a system (like .NET) expects them.

Validating a UUID

Paste any UUID into the validator to check it: the tool confirms the format, tells you the version and variant, and for v1 shows the exact date and time it was created. A UUID that fails validation usually has the wrong length, a missing group, or a character outside 0–9 and a–f. Copying a UUID from a log file often adds a stray space or a line break — trim those first. If a system rejects your UUID, check whether it wants hyphens, braces or uppercase before you assume the value is wrong.

Where UUIDs are used

UUIDs are everywhere in software. Databases use them as primary keys, so records can be created on any device and merged later without clashes. Web apps use them as session IDs and API tokens. File systems and cloud storage use them as file names, so two users uploading "photo.jpg" never overwrite each other. Operating systems use them to identify disks and partitions. If you have ever seen a long string of letters and numbers in a URL or a settings file, it was probably a UUID.

AdvertisementReserved ad space — AdSense ads will appear here after approval.

Advertisement — reserved ad space; AdSense ads will appear here after approval.

Frequently asked questions

What is a UUID?

A UUID (Universally Unique Identifier) is a 128-bit ID written as 36 characters — for example 550e8400-e29b-41d4-a716-446655440000. It is so unlikely that two random UUIDs ever match that developers use them as database keys, file names, session IDs and API identifiers without a central counter.

What is the difference between a UUID with and without hyphens?

Only the formatting. The standard form has hyphens — 550e8400-e29b-41d4-a716-446655440000 — while the compact form drops them: 550e8400e29b41d4a716446655440000. Both are the same 128-bit value, and most systems accept either. Use the hyphenated form in text and documents, and the compact form when a system asks for 32 characters.

Can I use a UUID as a database primary key?

Yes — that is one of the most common uses. Because a random UUID v4 is practically unique, you can generate IDs on any device without asking a central server, and merge data from different sources without clashes. Most databases (PostgreSQL, MySQL, MongoDB) support UUID columns, and UUIDs also work as file names, session tokens and API keys.

What is the difference between UUID v1 and v4?

v4 is random — 122 random bits, unpredictable, the usual choice. v1 is time-based — it embeds the creation time, so IDs sort in time order, but it reveals when it was created. Use v4 unless you need time ordering.

Can two UUIDs ever be the same?

In practice, no. A random v4 UUID has 122 random bits, so you would need to generate billions per second for a century to expect a single collision.

Is the UUID Generator free?

Yes — 100% free, no sign-up, and everything runs in your browser. Generate one UUID or a batch of up to 100, then copy them all or download as a .txt file.

Copied!