Skip to content
ToolMug

UUID Generator

Generate unique IDs in bulk — random UUID v4, time-sortable UUID v7 and ULID, or short Nano IDs — and inspect any UUID to read its version, variant and embedded timestamp. IDs are created with your browser's secure random generator.

Runs in your browser — nothing you enter is uploaded

Fully random. The most widely supported choice.

About 326,915.1T IDs before a 1% chance of any collision.

Inspect an ID

How to use

  1. Choose the ID type. UUID v4 is the default choice; pick v7 or ULID for database keys.
  2. Set how many you need and the format — uppercase, hyphens, braces or Nano ID length.
  3. Copy the list or download it as a text file. Press Generate for a fresh batch.
  4. To inspect an existing ID, paste it into "Inspect an ID".

Options explained

UUID v4
122 random bits. Supported by every database and language; the most common choice.
UUID v7
Defined in RFC 9562 (2024). The first 48 bits are a Unix timestamp in milliseconds, so new IDs sort after old ones. This keeps B-tree indexes compact and inserts fast in PostgreSQL and MySQL.
ULID
26 characters of Crockford Base32 — a 48-bit timestamp plus 80 random bits. Sortable, URL-safe and case-insensitive.
Nano ID
Short random IDs from a 64-character URL-safe alphabet. 21 characters give about the same collision resistance as UUID v4.

Formats at a glance

Type Example Length Sortable
UUID v4 9b2e4c1a-7f3d-4e8b-a1c2-5d6e7f8091a2 36 No
UUID v7 0199855e-7a40-7c3b-9e1f-2a3b4c5d6e7f 36 Yes
ULID 01K5JQ8H2G7R4T6W9X3Y5Z7A1B 26 Yes
Nano ID V1StGXR8_Z5jdHi6B-myT 21 No

Generating UUIDs in code

Frequently asked questions

Can two generated UUIDs be the same?

In practice no. With 122 random bits you would need to generate about 2.7 × 10¹⁸ v4 UUIDs before there is even a 50% chance of a single duplicate.

Should I use UUID v4 or v7 as a primary key?

v7 is usually better for new tables. Random v4 keys land all over the index, causing page splits and poor caching; v7 keys arrive in time order like an auto-increment, while still being unique across servers.

Does UUID v7 reveal when a record was created?

Yes, to the millisecond. If creation time is sensitive, use v4 for IDs that are shown publicly.

Are these IDs secure enough for tokens?

The random parts come from crypto.getRandomValues, so they are unpredictable. For session or reset tokens, prefer at least 128 random bits (for example a 22-character Nano ID) rather than a v7 UUID, whose timestamp part is guessable.

Is a GUID the same as a UUID?

Yes. GUID is Microsoft's name for the same 128-bit format, often written in uppercase inside braces, which you can select above.

Privacy

This tool runs entirely in your browser. Your files and text are processed on your device and are never uploaded to our servers.

Related tools