thoughtasylumTOOLBOX Preview

Tools › Developer

UUID Generator

Up to 1,000 UUIDs as version 4 (random), 7 (time-ordered), 1 (time-based) or 5 (from a namespace and name), ULIDs, NanoIDs and MongoDB ObjectIds, and a tool to read any of them.

About this tool What it's for, how to use it and an example

What it's for

Generate UUIDs: 128-bit identifiers that are, in practice, unique without any central registry. They’re used as database keys, request IDs, file names and test data. Choose the version that suits: 4 is random, 7 starts with the time so that new ones sort after older ones (good for database keys), 1 is an older time-based form, and 5 is made from a namespace and a name, so the same inputs always give the same UUID. It also makes the other common IDs: ULIDs, NanoIDs and MongoDB ObjectIds.

For example, when you need a fresh ID for a config file, a test fixture or a database row, a stable ID derived from a URL or name, or to find out when a v7 or v1 UUID you’ve been given was created.

How to use it

Pick a Kind, enter how many you want (up to 1,000) and choose Generate. Tick Upper case or No hyphens if the place you’re pasting them needs that format; both settings are remembered. Then use Copy: the UUIDs are one per line.

For version 5, choose a Namespace (DNS, URL, OID, X.500 or your own UUID) and type a Name. Only one UUID is made, because the same namespace and name always give the same result.

A ULID is 26 characters that sort by the time they were made; a NanoID is 21 random URL-safe characters; a MongoDB ObjectId is 24 hex digits holding the time in seconds, a random value and a counter.

To read an ID, paste it into Inspect a UUID, ULID or ObjectId. You get a UUID’s version and variant and, for versions 1 and 7, the time inside it in UTC and in your local time; for a ULID or an ObjectId, the time it was made. Braces, urn:uuid: and missing hyphens are accepted. Spell it out gives the IDs in the phonetic alphabet, for reading out.

Example

Choose version 5, namespace DNS and the name www.example.com. You always get:

2ed6657d-e927-568b-95e1-2665a8aea6a2

Choose version 4 with 3 and you get three lines like this, different every time:

ee9f43af-2e6b-4596-8c23-9e72793809c2

The third group starts with the version number, here 4.

Good to know

Random parts come from your browser’s secure random number generator, and version 5 uses its SHA-1. Version 1 UUIDs use a random node ID (never your network card’s address) and a random clock sequence, so they are not tied to your machine. Version 7 UUIDs made in the same millisecond are ordered only by their random bits. Versions 2, 3, 6 and 8 can be inspected for their version but not generated, and only versions 1 and 7 show a time.

Private: this tool runs in your browser. Nothing you type, paste or choose leaves this page.

Saved you a few minutes? Say thanks with a coffee.

Something wrong with this tool, or missing from it? Report a bug or suggest a feature.

↑ ↓ move↵ openesc close