Skip to content
CHARTOVANA

UUID Generator

Generate random UUIDs (version 4) in your browser, one at a time or up to 100 at once. Made with your device's secure random generator and never sent anywhere.
Runs in your browser. Nothing is uploaded.

How many

Format

Lowercase with hyphens is the standard form.

Your UUID

Generating a UUID…

More Utilities tools

How to generate Version 4 UUIDs online

  1. A new UUID appears as soon as the page opens. Choose how many you need: 1, 5, 10, 25, 50 or 100.
  2. Switch to uppercase or remove the hyphens if the system you're pasting into expects that.
  3. Copy the result, select Generate for a fresh set, or Clear to empty the result.

Examples

  • A primary key or record ID for a database row created outside the application, such as a fixture or a migration.
  • Test data: 50 unique IDs for a spreadsheet or a JSON file. Check the file afterwards with the JSON Formatter.
  • An idempotency key or correlation ID for an API request you are testing by hand.

What a version 4 UUID is

A UUID (universally unique identifier, also called a GUID) is a 128-bit value written as 32 hexadecimal digits in five groups, for example 3f0c2b7e-9a41-4c7d-8e2f-5b6a1d9c0e44. Version 4 UUIDs are random: 122 of the 128 bits are random, the rest mark the version (the 4 at the start of the third group) and the variant (8, 9, a or b at the start of the fourth group).

How unique are they?

With 122 random bits there are about 5.3 × 1036 possible values. You would need to generate around 2.7 × 1018 UUIDs before a single duplicate became even 50% likely, so in practice every UUID is unique.

How they are generated here

The tool uses the browser’s crypto.randomUUID(), which draws from the operating system’s secure random generator. Where that function isn’t available, the same format is built from crypto.getRandomValues(). Nothing is generated on a server.

Need to compare generated UUID lists or find duplicate IDs? Use our Text Diff Checker. You can also format JSON payloads containing UUID primary keys with our JSON Formatter, or encode identifiers into Base64 tokens using Base64 Encode / Decode.

RFC 4122 UUID Version Comparison Reference

UUID VersionGeneration MechanismPredictabilityPrimary Application
Version 1Timestamp + Host MAC AddressPredictable (leaks time and MAC)Legacy distributed systems
Version 4 (This Tool)Cryptographically Secure Pseudo-Random (CSPRNG)Completely Unpredictable (122 random bits)Modern database primary keys, session tokens, API request IDs
Version 5Namespace + Name (SHA-1 Hash)Deterministic (same name yields same UUID)Consistent resource addressing without central state
Version 7Unix Epoch Timestamp + Random BitsTime-ordered randomHigh-throughput database B-tree clustering

Database Performance: Storing UUIDs as Primary Keys

When using Version 4 UUIDs as relational database primary keys (PostgreSQL, MySQL, SQLite):

  • Binary vs. String Storage: Store UUIDs as native 16-byte binary types (e.g., PostgreSQL’s native uuid type, or BINARY(16) in MySQL) rather than 36-character text strings. This halves index size and significantly speeds up join performance.
  • B-Tree Fragmentation Considerations: Because Version 4 UUIDs are uniformly distributed and non-sequential, high-volume inserts into clustered primary key indexes can cause B-tree page splits. For write-heavy telemetry workloads with millions of rows per hour, consider UUIDv7 or combine a sequential auto-incrementing ID for internal clustering with a public-facing UUIDv4.

Frequently asked questions

Is a UUID the same as a GUID?

Yes. GUID (Globally Unique Identifier) is Microsoft’s nomenclature for the same 128-bit RFC 4122 format. A version 4 UUID is a valid GUID.

Are UUIDs case-sensitive?

No. The standard canonical representation defined in RFC 4122 uses lowercase hexadecimal digits. However, uppercase is mathematically equivalent and commonly preferred in legacy Microsoft Windows enterprise systems.

What is the collision probability of Version 4 UUIDs?

Version 4 UUIDs contain 122 bits of true entropy ($2^122 \approx 5.3 \times 10^36$ values). To achieve a 1 in a billion chance of a collision, you would need to generate over 103 trillion UUIDs.

Can I use these UUIDs as secret authentication keys?

While completely unpredictable, UUIDs are intended as public resource identifiers and often appear in server URLs, database logs, and request headers. For cryptographic secrets or passwords, use our Password Generator.

Newsletter

Get new tools by email

Occasional emails when we add useful tools or improve existing ones. Optional: every tool stays free without it.

We'll email you a link to confirm. Unsubscribe anytime. See our Privacy Policy.

Last updated