← All tools

UUID generator

Generate UUIDs (GUIDs) in bulk: random version 4, time-ordered version 7 for database keys, or name-based version 5 that always gives the same UUID for the same name. Copy them as lines, JSON or SQL, and check what any UUID is. Made on your device with the secure random generator.

122 random bits. Right for almost everything.

Enjoying UUID Generator?Your review and ideas shape what we build next.

Review UUID Generator

Please don't include file contents or passwords.

About the UUID Generator

Generate universally unique identifiers (UUIDs, also called GUIDs) for databases, APIs, test data and file names. Choose random version 4, the time-ordered version 7 that keeps database indexes fast, or name-based version 5, which always produces the same UUID for the same name. Make up to 1,000 at once, write them in capitals, without hyphens or in curly braces, and copy them one per line, comma-separated, as a JSON array or as an SQL IN list. Paste any UUID into the checker to see its version and variant, and the time it was created if it is a time-based UUID.

How to use it

  1. Pick the version: v4 for general use, v7 for database keys, v5 to turn names into stable IDs.
  2. Choose how many to make, or for v5 choose a namespace and type the names, one per line.
  3. Set the format: capitals, hyphens and curly braces.
  4. Choose the output (lines, comma-separated, JSON or SQL) and copy or download it.
  5. To check an existing UUID, paste it into Check a UUID.

Tip: For new database tables, use UUID v7 rather than v4. Because v7 IDs start with the time they were made, new rows go at the end of the index instead of a random place in it, which keeps inserts fast and the index small, while the IDs stay just as unique.

UUID versions at a glance

Version 4 (random)
122 random bits. The most widely used kind, supported everywhere, and right for almost any ID that doesn't need to be sorted.
Version 7 (time-ordered)
Defined in RFC 9562 (2024): a 48-bit millisecond timestamp followed by random bits. IDs sort by creation time, which suits database primary keys, logs and event streams.
Version 5 (name-based)
A SHA-1 hash of a namespace and a name. example.com in the DNS namespace always gives the same UUID, on any computer, so it is useful for de-duplicating records or making IDs from URLs.
Version 1 and 6
Older time-based versions that include the computer's network address. The checker reads their timestamps, but new systems should use v7.
Nil and max
00000000-0000-0000-0000-000000000000 and ffffffff-ffff-ffff-ffff-ffffffffffff are special values for “no ID” and “highest possible”.

Are UUIDs really unique?

Nothing checks a central list, so uniqueness comes from probability. A v4 UUID has 2^122 possible values, about 5.3 × 10^36. You would need to make roughly 2.7 quintillion of them before there was even a 50% chance of a single duplicate. In practice, a duplicate comes only from a broken random generator, which is why this tool uses the browser's cryptographic one.

Version 7 has 74 bits after the timestamp. This generator uses 12 of them as a counter for UUIDs made in the same millisecond, so a batch still sorts in the order it was made, and fills the other 62 with random data: still billions of billions of possibilities every millisecond.

Formats and where they're used

Standard
550e8400-e29b-41d4-a716-446655440000: 32 hex digits in groups of 8-4-4-4-12. Use it unless a system asks otherwise.
GUID with braces
{550E8400-E29B-41D4-A716-446655440000}: the Microsoft style, seen in Windows registry keys, .NET and SQL Server.
Without hyphens
32 characters, used where hyphens aren't allowed or to save space.
JSON array and SQL IN
Ready to paste into test fixtures or a query: WHERE id IN ('…', '…').

UUIDs in databases

Store UUIDs in a native UUID column where there is one (PostgreSQL uuid, SQL Server uniqueidentifier) or as 16 bytes (MySQL BINARY(16)), not as 36-character text, which takes more than twice the space and slows comparisons. Most languages can generate them too: crypto.randomUUID() in JavaScript, uuid.uuid4() in Python and Guid.NewGuid() in C# all make version 4.

Making UUIDs in code

Most of the time your program should create its own UUIDs, and this tool is for test data, seed files, configuration and one-off records. In JavaScript and Node.js, crypto.randomUUID() returns a version 4 UUID. Python has uuid.uuid4() and uuid.uuid5(namespace, name), and since Python 3.14 uuid.uuid7(). Java has UUID.randomUUID(), C# Guid.NewGuid() (and Guid.CreateVersion7() in .NET 9), PHP has packages such as ramsey/uuid, and PostgreSQL 13 and later has gen_random_uuid() built in, with uuidv7() added in PostgreSQL 18.

Version 5 UUIDs made here match the ones those libraries make, because the algorithm is fixed: the namespace UUID and the name, hashed with SHA-1. That makes the v5 mode handy for checking a value your code produced, or for working out an ID in advance. Remember that the name is case-sensitive and spaces count, so “Example.com” and “example.com” give different UUIDs.

UUIDs compared with other IDs

Auto-increment numbers
Short and readable (1, 2, 3…), but they reveal how many records you have, can be guessed, and clash when two databases are merged. UUIDs avoid all three.
ULID and KSUID
Time-sortable IDs that predate UUID v7. Where your tools support v7, it gives the same benefit in the standard UUID format.
Short random IDs
Tools like nanoid make shorter strings for URLs. They are fine where a database doesn't need a UUID column type.

Tips and tricks

Don't use as secrets

UUIDs are unique, not secret. Use the password generator for tokens and keys.

v7 reveals time

A v7 UUID shows when it was made; use v4 where that matters.

Same name, same ID

Use v5 to give the same record the same ID in two separate systems.

Case doesn't matter

UUIDs compare the same in capitals or small letters; the standard writes them small.

Questions

What is a UUID?

A 128-bit identifier written as 32 hexadecimal digits, like 550e8400-e29b-41d4-a716-446655440000, designed to be unique without a central registry.

What is the difference between a UUID and a GUID?

None in practice. GUID is Microsoft's name for a UUID, often written in capitals inside curly braces.

Should I use UUID v4 or v7?

Use v7 for database primary keys and anything sorted by time; use v4 when the ID shouldn't reveal when it was created.

How do I check a UUID's version?

Paste it into Check a UUID. The version is also the first digit of the third group: …-41d4-… is version 4.

How many UUIDs can I generate?

Up to 1,000 at a time, as often as you like.

Is anything sent to a server?

No. The tool runs entirely in your browser, on your device. Nothing you type or make is uploaded, saved or logged.

Related tools

Updated