๐Ÿ› ๏ธ Developer ยท Updated October 11, 2026 ยท 8 min read

Generate a UUID: What It Is, How to Make One, Why It Works

random unique ID ๐Ÿ†”

To generate a UUID, open GrabCast's UUID Generator, leave Count at 1 and click Generate: you get a random version 4 identifier such as 3f2b8c1e-9a4d-4c7b-b1e2-5d6f7a8b9c0d, created in your browser by the crypto.randomUUID function and ready to copy. In code it is usually one line, for example uuid.uuid4() in Python or crypto.randomUUID() in JavaScript. This explainer is for people meeting UUIDs for the first time, whether a junior developer, a QA tester filling in a form field or an analyst who keeps seeing these strings in exports. It covers how to read the 36 characters, why a value made on your laptop will not clash with one made on a server in another country, where UUIDs are the right label, and the handful of situations where a plain counter or a short code serves people better.

๐Ÿ†” Try the UUID Generator tool now โ€” freeOpen โ†’
UUID Generator with Count 1 and one generated 8-4-4-4-12 hexadecimal UUID ready to copy
One random UUID, generated locally and ready to paste.
๐Ÿ’ก Why UUIDs exist

Before UUIDs, most systems numbered records with a shared counter: order 1001, order 1002 and so on. That works until two servers, two offline phones or two merged databases each hand out order 1002. Coordinating one counter across machines is slow and fragile. A UUID removes the coordination entirely. It is 128 bits long, and a version 4 value fills 122 of those bits with random data, so any device can create an identifier on its own and trust that nobody else will ever produce the same one. That independence is why UUIDs label database rows, uploaded files, API requests, Bluetooth services and software packages all over the world.

How to read the 36 characters of a UUID

Every standard UUID is written as 32 hexadecimal digits in five hyphen-separated groups of 8, 4, 4, 4 and 12 characters, 36 characters in total. Only the digits 0 to 9 and the letters a to f appear, and upper and lower case mean the same thing, although lowercase is the recommended output.

Other versions fill the remaining bits differently. Version 1 mixes a timestamp with a hardware address, versions 3 and 5 are hashes of a name, and version 7, added in RFC 9562 in 2024, starts with a millisecond timestamp. Version 4 remains the most widely used.

Why two random UUIDs practically never collide

A version 4 UUID has 2 to the power of 122 possible values, about 5.3 undecillion. Uniqueness is not guaranteed by any central registry; it is guaranteed by that size.

Careful teams still add a unique constraint to the column. It costs little and turns an impossible-but-catastrophic event, or more realistically a bug that reuses a value, into an ordinary error.

Ways to generate a UUID in a browser, code or terminal

The browser tool is quickest when you need a value to paste into a form, a config file or a test. Set Count anywhere from 1 to 100, click Generate and click Copy; values come out lowercase, one per line, and nothing is sent to a server. Clicking Generate again always produces fresh values.

Where UUIDs fit and where they do not

UUIDs shine wherever independent parts of a system must name things without asking each other first: records created on an offline mobile app and synced later, files in cloud storage, correlation IDs that follow one request through ten services, and idempotency keys that stop a payment from being charged twice when a client retries.

A UUID is an identifier, not a secret, so use the Password Generator for anything that must stay private. For a fingerprint of content rather than a random ID, try the Hash Generator.

Step-by-step

1234
1Open the UUID Generator in your browser; it works on any current version of Chrome, Edge, Firefox or Safari.
UUID Generator toolbar with Count set to 1 next to the Generate and Copy buttons
Set Count to 1 when you only need one identifier.
2Leave Count at 1 for a single value, or enter any number up to 100 for a list.
One freshly generated random version-4 UUID in the output box after clicking Generate
Click Generate: a new random UUID appears instantly, made in your browser.
3Click Generate to create random version 4 identifiers, one per line, then click Copy.
Copy button switched to Copied after copying the single UUID to the clipboard
Press Copy, then paste the value into your database, code or config file.
4Paste the value where it is needed and check that the third group starts with 4, which confirms a random version 4 UUID.

Common mistakes to avoid

โš ๏ธShowing UUIDs to customers as order or ticket numbers that they must read out or type.
โš ๏ธGenerating identifiers with a non-cryptographic random function, which can repeat far sooner than the math suggests.
โš ๏ธAssuming random UUIDs sort by creation time and using them to order records.
โš ๏ธTreating a hard-to-guess UUID in a link as protection for private data without an access check.

Pro tips

โœ“Normalize to lowercase before comparing or storing, since uppercase and lowercase forms are the same UUID.
โœ“Keep a unique constraint on any UUID column even though collisions are vanishingly unlikely.
โœ“Use the nil UUID only as an explicit placeholder, never as a real record key.
โœ“Log a request UUID at every service boundary so one ID traces a failure through the whole system.
โœ“When you only need a short human-facing reference, generate that separately and keep the UUID internal.

Frequently asked questions

What does UUID stand for?

Universally unique identifier. It is a 128-bit value defined by RFC 4122 and its 2024 successor RFC 9562, written as 32 hex digits in an 8-4-4-4-12 pattern.

Is a UUID the same as a GUID?

Yes. GUID, or globally unique identifier, is the name used in Microsoft products for the same 128-bit format.

Can I tell when a UUID was created?

Not from version 4, which is random apart from the version and variant digits. Versions 1 and 7 do contain a timestamp.

Is the online generator safe to use?

Yes. The GrabCast tool creates values locally with the browser's secure crypto.randomUUID function and does not send or store them, so only you see them.

How many UUIDs can I generate at once?

Up to 100 per click, one per line. Click Generate again for another batch; each batch is new.

๐Ÿ“Œ Bottom line

A UUID is a 36-character, 128-bit label that any device can create without checking with anyone else, and a random version 4 value is unique for every practical purpose. Generate one in the browser tool or with one line of code, read the version digit to know what you have, and keep UUIDs for machines rather than for people.

Open the UUID Generator tool โ†’

Related guides

Browse more: all text and developer guides ยท the UUID Generator tool