Skip to content
DeveloperRuns in your browserPopular

UUID Generator

Generate v4 UUIDs, plus v1, v7 and NIL values in bulk.

Input
No upload needed — instant
Privacy
Nothing is uploaded
Cost
Free · no sign-up · no watermark

Loading tool…

The tool is loading its code on your device. This happens once and is cached for later visits.

Processed entirely on your device

Everything you type or paste is handled by JavaScript running in this tab. No request is sent, nothing is logged and nothing is stored. Close the page and it is gone.

Overview

About the UUID Generator

Generate UUIDs and GUIDs free online — version 4 (random), version 7 (time-ordered), version 1 (timestamp plus node) and NIL. Bulk generation with formatting options.

A UUID is a 128-bit identifier designed to be unique without any central coordination. That is the whole value proposition: two systems, in two data centres, with no communication between them, can each mint identifiers and be confident they will never clash.

The anatomy

A UUID renders as 32 hexadecimal digits in five groups: 8-4-4-4-12.

f47ac10b-58cc-4372-a567-0e02b2c3d479
              ↑    ↑
           version variant

The first digit of the third group is the version. The first digit of the fourth group is the variant, which for all modern UUIDs is 8, 9, a or b — indicating the RFC 4122 layout.

Versions worth knowing

v1 — timestamp and node. Combines a 60-bit timestamp with the generating machine's MAC address. Ordered and traceable, but it leaks the creation time and, historically, hardware identity. Still used in legacy COM and Windows systems.

v3 and v5 — name-based hashes. Deterministic: the same namespace plus the same name always yields the same UUID. v3 uses MD5, v5 uses SHA-1; prefer v5. Useful for generating stable identifiers from URLs, email addresses or domain names.

v4 — random. 122 random bits. The default choice, supported natively by crypto.randomUUID() in every modern browser.

v6 — reordered v1. The same fields as v1 but arranged so the timestamp sorts first. A compatibility option for systems migrating off v1.

v7 — Unix time plus random. A 48-bit millisecond timestamp followed by 74 random bits. Sortable, index-friendly and privacy-safe, because the timestamp carries no hardware identity. This is the version new systems should choose for primary keys.

NIL. 00000000-0000-0000-0000-000000000000 — the sentinel value meaning "no identifier". Useful as a default and for testing null handling.

Choosing between v4 and v7

Use v4 when identifiers are exposed to users or clients and you do not want them to reveal anything about creation order or rate. An API key, a session ID, a file name in a public bucket — all better as v4, because v7 lets an observer infer when things were created and how fast.

Use v7 for internal database primary keys. The sequential prefix turns random-insert index churn into append-only writes. On a large PostgreSQL or MySQL table the difference in index size and write latency is substantial and well documented.

Formatting for real use

  • Plain hex (32 characters) for fixed-width storage and some legacy systems.
  • Braces for .NET, SQL Server's uniqueidentifier literals and Windows GUID conventions.
  • Uppercase where a system's collation or display convention requires it — UUID comparison is case-insensitive at the byte level.
  • Quoted list for WHERE id IN (...) clauses and JSON arrays of test fixtures.

Store them as a native UUID type or as BINARY(16) where the database supports it. Storing 36-character strings in a VARCHAR column wastes space and slows every index that touches them.

Step by step

How to use the UUID Generator

  1. Choose a UUID version — v4 for general use, v7 for database keys.

  2. Set how many you need, from one to a thousand.

  3. Pick a format: hyphenated, plain hex, uppercase, braces, or a quoted SQL/JSON list.

  4. Press Generate; identifiers come from the browser's cryptographic RNG.

  5. Copy the list, or download it as a text file.

Why use it

Benefits and common use cases

What this tool is good for, and what it deliberately does not try to do.

Cryptographically random

Uses crypto.getRandomValues and, where available, the native UUID v4 implementation — never Math.random(), which is not remotely suitable for identifiers.

Version 7 support

Time-ordered UUIDs keep database indexes sequential while staying globally unique — the modern replacement for v4 primary keys.

Bulk generation with formats

Produce seed data, test fixtures or migration keys in the exact syntax you need, including quoted comma-separated lists for SQL IN clauses.

Nothing transmitted

Identifiers generated in your tab are never seen by a server, which matters when they are for a system that is not yet public.

Questions

Frequently asked questions

Short, honest answers about quality, limits and privacy.

What is the difference between a UUID and a GUID?

Nothing meaningful. UUID is the term from RFC 4122 and the open standards world; GUID is Microsoft's name for the same 128-bit identifier. The formats are interchangeable, and the term you use usually just reveals which ecosystem you came from.

Which UUID version should I use?

Version 4 for almost everything — it is uniformly random and universally supported. Version 7 for database primary keys, because its timestamp prefix keeps B-tree indexes append-only and avoids the page-splitting that random v4 keys cause. Version 1 only when you need the generating timestamp and do not mind exposing a MAC address.

Can a UUID collide?

The probability is negligible. A v4 UUID has 122 random bits, so generating one billion per second for a century gives a collision probability around 10^-18. Practically, collisions indicate a broken random source rather than bad luck.

Why is UUID v7 better for database indexes?

Random v4 keys are inserted at arbitrary positions in a B-tree, causing page splits, poor cache locality and index bloat. v7 begins with a 48-bit Unix millisecond timestamp, so new keys are always greater than existing ones and inserts append sequentially — combining global uniqueness with the write performance of an auto-increment.

Are the generated UUIDs safe to use in production?

Yes. They come from the browser's cryptographically secure pseudorandom number generator, the same source used for cryptographic keys. The only caveat is that generation happens client-side, so your application must generate its own identifiers server-side rather than trusting client-supplied ones.