UUID Generator Widget

Add a UUID generator to your developer docs. Readers generate up to 100 identifiers at once - random version 4 or time-ordered version 7 - in lowercase or uppercase, with or without hyphens or braces.

Developer Tools Generator Runs in your browser Free · no ads

Customize your widget

Theme
Auto follows the visitor's light/dark setting.
Style
Attribution on your page
Optional and entirely your choice. The exact line is shown in the code below; it links to the tool with rel="nofollow".
More options
Starting values
Leave blank to use the widget's defaults. Visitors can still change every value.

Live preview

Exactly what your visitors will see

Embed code

<iframe src="https://a2z.tools/embed/w/uuid-generator" title="UUID Generator by A2Z Tools" width="100%" height="560" style="border:0;width:100%" loading="lazy" allow="clipboard-write"></iframe>

A plain iframe. Works everywhere, including site builders that strip scripts. Adjust height if your content needs more room.

Works with

How it works

Version 4 UUIDs are 122 random bits from the browser's cryptographically secure generator (crypto.randomUUID or crypto.getRandomValues), with the version and variant bits set as RFC 9562 requires. Version 7 UUIDs start with the current Unix time in milliseconds, so they sort by creation time - which keeps database indexes compact - followed by a 12-bit counter and 62 random bits. Within one batch the counter increases, so every UUID in the list sorts after the previous one even when they share a millisecond.

Method

  • v4: 122 random bits; version nibble 0100; variant bits 10 (RFC 9562 section 5.4)
  • v7: 48-bit Unix ms timestamp | version 0111 | 12-bit counter | variant 10 | 62 random bits (RFC 9562 section 5.7, method 1)
  • Randomness: crypto.getRandomValues (CSPRNG)
  • Formats: 8-4-4-4-12, no hyphens, {braces}, urn:uuid: prefix

Limitations

  • Only versions 4 and 7 are generated; name-based v3/v5 (MD5/SHA-1 of a namespace and name), v1/v6 MAC-address time UUIDs and custom v8 are not.
  • v7 timestamps come from the visitor's device clock; if that clock is wrong, the embedded creation time is wrong too.
  • Ordering is guaranteed only within one generated batch, not across separate clicks or other machines.

Where publishers use it

  • Database and ORM tutorials comparing auto-increment keys with UUIDs
  • API docs where readers need idempotency keys or request IDs
  • Test-data pages for QA teams
  • Articles explaining why UUIDv7 is friendlier to B-tree indexes than v4

Questions

Can two generated UUIDs collide?

For v4 the chance is negligible: you would need to generate about 2.7 quintillion to reach a 50% chance of one duplicate.

Should I use v4 or v7?

Use v7 for database primary keys, because new rows land at the end of the index. Use v4 when the ID must not reveal when it was created.

Are these UUIDs stored anywhere?

No. They are created in the visitor's browser and disappear when the page is closed.

Is a UUID the same as a GUID?

Yes. GUID is Microsoft's name for the same 128-bit format; choose the braces format for the style used in Windows tools.

Sources

  1. RFC 9562: Universally Unique IDentifiers (UUIDs) - IETF . Layouts of v4 (5.4) and v7 (5.7), counter method 1 (6.2); obsoletes RFC 4122; May 2024
  2. Web Cryptography API: getRandomValues and randomUUID - W3C . Cryptographically secure randomness source

Cite or recommend this tool

If you reference this tool in an article, course or documentation, these formats are ready to copy. They are optional - nothing is added to your site unless you paste it.

A2Z Tools UUID Generator
https://a2z.tools/uuid-generator

Preview