One UUID

Shape

Uppercase and braces together are the Windows GUID shape. The options only change how it is written: it is the same identifier throughout.

A batch

From 1 to 100. A hundred lines fit in a box you can scroll; a thousand are not copied off a page.

The batch appears here.

Version 4, RFC 4122 variant: of the 128 bits, six are fixed and say exactly that. The other 122 are random.

The bits come from crypto.getRandomValues, the browser cryptographic generator. Not from Math.random, which is not unpredictable: an identifier you can guess is not an identifier.

With 122 bits, reaching a one-in-a-billion chance of producing the same value twice would take a hundred and three trillion of them.

Everything happens in your browser: no data is sent anywhere.

How it works

  1. There is one waiting for you already. The button draws another.
  2. Pick the shape if you need it uppercase, without hyphens or in braces.
  3. To fill a table, generate a batch and copy the lot in one go.

Why it exists

Because you need one right now, for a test row, for an example key, for a field that cannot stay empty. And because the short way — open a console and call crypto.randomUUID() — still means opening a console, which is not what you were doing at that moment.

About the six bits that are not random

A v4 UUID is 128 bits long, but only 122 of them are random. The other six are fixed and say what that string is: four say “version 4”, two say “RFC 4122 variant”. In the written form they are the 4 at the start of the third group, and the first digit of the fourth, which is always 8, 9, a or b.

They are the part a hastily written generator gets wrong, and it gets it wrong silently: sixteen random bytes lined up give a string that looks right, passes a glance, and is rejected months later by somebody else’s validator.

About the source

The bits come from crypto.getRandomValues, the browser’s cryptographic generator. Not from Math.random, which is not unpredictable: its sequence can be reconstructed by watching enough of it, and an identifier you can guess is not an identifier.

Where the browser offers crypto.randomUUID that is used instead — the same thing, written by the platform. It is not always there: that function requires a secure connection, so it disappears when you look at the site from a phone on the local network over http://. That is the case where this page keeps working instead of stopping without saying so.

About collisions

With 122 random bits, reaching a one-in-a-billion chance of producing the same value twice would take a hundred and three trillion of them. That is not “unlikely”: it is a number you do not get to.

About your data

Everything happens in your browser. This site is made of static files and has no server to send anything to, even if it wanted one — which for an identifier generator is worth saying twice.

From here you also go here

Timestamp converter

From epoch to date and back, in seconds or milliseconds, with ISO 8601 and the time in any zone.

Development

JSON formatter and validator

Paste some JSON, find out whether it is valid and where it breaks, with line and column when the browser gives them.

Development

JWT decoder

A token's header and payload, with readable dates and glossed claims. The signature is not verified, and the tool says so.

Development

All tools