My Tool Studio
Developer

UUID Generator

This UUID generator creates version 1, 3, 4, 5, 6 and 7 UUIDs, plus the nil and max values, using your browser's secure crypto API. Choose a version, enter how many you need up to 10,000, and click Generate. For v3 and v5, pick a namespace such as DNS or URL and type one name per line to get the same ID for the same name every time. Format options add uppercase, remove hyphens, wrap GUIDs in braces, add a urn:uuid: prefix or quotes, and change the separator. Copy the list or download it as .txt, .csv or .json. The Validate and decode tab checks any UUID and reads the time inside v1, v6 and v7 IDs. Nothing is sent to a server.

Always freeNo sign upRuns in your browser

How to use

01

Pick a version and a count

Choose a version, then type a number from 1 to 10,000 in How many. For v3 or v5, choose a namespace and enter names, one per line, instead of a count.

02

Generate and format

Click Generate. Tick UPPERCASE, Hyphens, {Braces} or urn:uuid:, choose quotes for SQL or JSON, and pick a separator. The list changes format without generating new IDs.

03

Copy, download or decode

Use Copy all or a single Copy button, or download .txt, .csv or .json. Paste any UUID into Validate and decode to see its version, variant and embedded time.

Why UUID Generator

UUID versions compared

All UUIDs share the same 36-character layout, but the version decides how the bits are filled. This tool generates every version below, plus v3 (like v5 but with MD5) and the nil and max values. For v1 and v6 it fills the node part with random bits instead of your network card's MAC address.

A quick rule: use v4 when you just need a unique, unguessable ID, v7 when the ID will be a database key or needs to sort by creation time, and v5 when the same input must always produce the same ID.

VersionHow it is builtTypical use
v1Timestamp plus a node ID, often the network card's MAC addressLegacy systems; can reveal the machine and time
v4122 random bitsGeneral purpose; the most common version
v5SHA-1 hash of a namespace and a nameRepeatable IDs, such as one ID per URL
v6The v1 timestamp reordered, most significant bits firstMoving v1 systems to IDs that sort by time
v748-bit Unix time in milliseconds plus random bitsDatabase keys and anything that should sort by time

Common questions

What is the difference between UUID v4 and v7?
v4 is 122 random bits with no order. v7 puts a 48-bit Unix timestamp in milliseconds at the front and fills the rest with random bits, so IDs created later sort later. Both are 36 characters with hyphens and fit the same database column types.
Should I use UUID v7 or v4 for a database primary key?
v7 is usually the better key for B-tree indexes, because new rows land at the end of the index instead of random places, which means fewer page splits. v4 is fine for low write volumes, or when you do not want the creation time visible, since anyone can read the timestamp inside a v7 ID.
Is a GUID the same as a UUID?
Functionally, yes. GUID is Microsoft's name for the same 128-bit identifier format, so tools and databases treat the two labels as the same thing. Some Windows tools show GUIDs in uppercase or wrapped in braces, but the value is the same.
How likely is a collision between two random UUIDs?
With 122 random bits in a v4 UUID there are about 5.3 undecillion possible values. You would need to generate billions per second for decades before a duplicate became a realistic worry.
Why does every v4 UUID have a 4 in the same position?
That digit is the version marker. The first character of the third group is always 4 in a v4 UUID and 7 in a v7 UUID. The first character of the fourth group is always 8, 9, a or b, which marks the variant.
Can I use this as a bulk UUID generator for seeding data?
Yes. It makes up to 10,000 identifiers per click. Choose Comma and space as the separator and single quotes to paste them into a SQL IN list, or download .csv or .json for scripts and spreadsheets.
Do the generated UUIDs ever leave my browser?
No. They are generated locally with the Web Crypto API, so nothing is sent to a server, logged or reused. Refreshing the page discards them.
How do I read the timestamp inside a UUID v7?
Paste it into the Validate and decode tab, which shows the time in UTC and in your local time. By hand, take the first 12 hex digits, ignoring the hyphen: they are the milliseconds since 1 January 1970 UTC. In JavaScript, new Date(parseInt(id.replace(/-/g, '').slice(0, 12), 16)) gives the same date.
How do I generate a UUID in code?
In JavaScript use crypto.randomUUID(), in Python uuid.uuid4(), in Java UUID.randomUUID() and in C# Guid.NewGuid(). In PostgreSQL 13 and later, gen_random_uuid() returns a v4 UUID. The Code tab on this page lists these and more, including v7 functions in .NET 9, Go and PostgreSQL 18.
What are UUID v3 and v5 used for?
They turn a name into a fixed ID. The same namespace and name always give the same UUID, so two systems can agree on an ID for a URL, a domain or a customer number without sharing a database. v5 uses SHA-1 and v3 uses MD5; prefer v5 for new work.

More Developer tools

View all