UUID Generator

Generate UUID v4 and v7 in bulk, and validate any UUID to see its version, variant and timestamp.

Options

Version

122 random bits. The usual choice when order does not matter.

Letters
Copy and download as
0 UUIDs
Press Generate to create UUIDs.

Validate and decode

Paste any UUID to see its version, its variant and, for v1, v6 and v7, when it was made.

Dashes, braces, upper or lower case and the urn:uuid: prefix are all accepted.

UUIDs are generated in your browser with its cryptographic random number generator. Nothing is sent to Tooly's server.

About the UUID Generator

Generate UUIDs for database keys, test data or configuration files: random v4, or v7, which starts with a timestamp so the IDs sort in the order they were made. Create one or a thousand at a time, in the format your code expects, and copy or download them. Paste any UUID into the validator to check it and see its version, its variant and, for time-based versions, when it was created.

How to use the UUID Generator

  1. Choose the version and how many

    Pick v4 for plain random IDs or v7 for IDs that sort by creation time, then type a number from 1 to 1,000 or use one of the presets. The list refreshes at once; press Generate for a new batch.

  2. Pick the format

    Switch between lowercase and UPPERCASE, and turn the dashes and the {braces} on or off. The list updates without generating new UUIDs, and your choices are remembered for next time.

  3. Copy or download

    Click any UUID to copy it, or use Copy all and Download. Choose One per line for a plain list or JSON array to paste the batch straight into code or a fixture file.

When to use it

Database primary keys

UUID v7 keys can be created by the application before the insert and still arrive in order, which keeps B-tree indexes compact, unlike fully random v4 keys.

Test data and fixtures

Generate hundreds of IDs at once as a JSON array for seed scripts, mocks and API tests, or as a plain list for a spreadsheet.

Debugging IDs from logs

Paste an ID from a log or a database row to confirm it is a well-formed UUID, find out which version produced it and, for v1, v6 and v7, read when it was created.

Frequently asked questions

Can two generated UUIDs be the same?

In practice, no. A v4 UUID has 122 random bits, about 5.3 × 10^36 possible values: you would need to generate around 2.7 × 10^18 of them, a billion per second for 86 years, to reach a 50% chance of a single duplicate. A v7 UUID puts a millisecond timestamp before its random bits, and the v7 UUIDs this page makes in the same millisecond are strictly increasing, so they cannot repeat each other.

Should I use UUID v4 or v7?

Use v7 for database keys and anything you want to sort by creation time: new rows land at the end of the index instead of at random places, which makes inserts faster. Use v4 when order does not matter or when the ID must not reveal when it was created, because anyone who sees a v7 UUID can read its timestamp.

What is the difference between a UUID and a GUID?

None in practice: GUID is the name Microsoft uses for the same 128-bit identifier. Windows tools usually print them in uppercase and sometimes inside braces, such as {0F8FAD5B-D9CB-469F-A165-70867728950E}, which you can get here with the UPPERCASE and Braces options.

How does the validator find the date in a UUID?

A v7 UUID starts with 48 bits of Unix time in milliseconds. Versions 1 and 6 hold a 60-bit count of 100-nanosecond intervals since 15 October 1582, the start of the Gregorian calendar; v6 stores it in sortable order. Versions 3, 4 and 5 hold no date, and v8 is free-form, so its layout is unknown. The date only says what the clock of the machine that made the UUID read at the time.

Are the UUIDs generated on a server?

No. They are made in your browser with crypto.randomUUID and crypto.getRandomValues, the same cryptographic random number generator browsers use for encryption keys, and nothing is sent to Tooly's server. Only your format options are saved, in your browser's local storage; the UUIDs themselves are not kept.