Developer

UUID Generator

Generate random UUIDs v4

Loading interactive tool…

Embed this tool on your site

About this tool

Universally Unique Identifiers are the backbone of distributed systems, databases, and APIs. Whether you are assigning primary keys to database rows, creating idempotency tokens for payment requests, naming S3 objects, or tracking analytics sessions, you need IDs that are unique across machines and time without requiring a central coordinator. UUID Generator produces random version 4 UUIDs directly in your browser, using crypto.getRandomValues for the 122 random bits. Output is lowercase with hyphens in the standard 8-4-4-4-12 layout by default; tick Uppercase letters for systems that expect capitals, or Remove dashes for a compact 32-character hex string. Click Generate UUID for one ID or Generate 5 for a batch of five, one per line, then copy the whole result with one click. A fresh UUID is ready as soon as the page opens.

Why use it

  • One Click, Standard Format: Generate a random v4 UUID in the standard lowercase hyphenated layout that most frameworks, ORMs and databases accept.

  • Cryptographically Secure v4: Version 4 UUIDs are generated using the browser's Web Crypto API (crypto.getRandomValues), ensuring statistical uniqueness across distributed systems.

  • Batches of Five: Generate 5 produces five UUIDs, one per line — handy for a few fixture rows or test requests; click again for another five.

  • Flexible Format Options: Tick Remove dashes for compact storage in MySQL CHAR(32) columns, or keep them for the standard RFC 4122 layout; tick Uppercase letters for systems that expect capitals.

  • Fully Client-Side: All UUID generation runs in your browser using the Web Crypto API — no server round-trip means no latency, no logging, and no rate limits.

How to use

  1. Optionally tick 'Uppercase letters' and/or 'Remove dashes' to set the output format.
  2. Click 'Generate UUID' for a single v4 UUID, or 'Generate 5' for five at once, one per line.
  3. Click 'Copy result' to copy everything in the result box.
  4. Click either generate button again for new IDs; each click replaces the previous result.
  5. Click 'Clear' to empty the result box.

When it helps

  • When assigning primary keys to new database records before inserting them, avoiding a round-trip to fetch an auto-increment ID.
  • When building a REST API and needing unique idempotency keys for POST requests to prevent duplicate operations on retry.
  • When naming files or objects in cloud storage (S3, GCS) to avoid collisions without a central naming registry.
  • When seeding a few rows of development or test data with unique identifiers.
  • When a system requires uppercase or dashless UUIDs and you want them formatted that way without editing by hand.
  • When prototyping a distributed system locally and needing valid UUID-format strings to paste into config files or environment variables.

Examples

v4 random UUID (sample output)

Input
Generate UUID | Uppercase letters: off | Remove dashes: off
Expected result
f47ac10b-58cc-4372-a567-0e02b2c3d479

v4 compact for MySQL CHAR(32) column (sample output)

Input
Generate UUID | Uppercase letters: on | Remove dashes: on
Expected result
F47AC10B58CC4372A5670E02B2C3D479

Batch of five for test fixtures (sample output)

Input
Generate 5 | Uppercase letters: off | Remove dashes: off
Expected result
d3bd173a-4f82-4672-b572-9531c89bd044
156f97d3-664a-48c2-a6f3-16b7af8661ba
7747b18d-9d37-4c71-950f-8e7691e5563d
beea504f-400d-4039-828e-57745e43e087
9f486f08-03d1-4fd5-8436-353b586425ed

Tips

  • Use v4 for nearly all use cases — it requires no configuration and its 122 bits of randomness make collisions astronomically unlikely in any real-world system.
  • When inserting UUIDs into a SQL migration file, click Generate 5 as many times as you need and copy each batch into your VALUES list.
  • Remove dashes gives the 32-character form; if a system later needs the standard layout, re-insert dashes after characters 8, 12, 16 and 20.
  • Uppercase UUIDs are functionally identical to lowercase; most modern databases and APIs are case-insensitive for UUID comparison, but adopt a consistent case convention across your codebase.
  • To test UUID-based routing in your app (e.g. /users/:id), generate a few v4 UUIDs here and paste them directly into your browser address bar or Postman without writing any generation code.

Frequently Asked Questions

What is the difference between UUID v1, v4, and v5?
v1 is time-based and encodes the current timestamp plus a MAC address, so it is sortable by creation time but leaks machine identity. v4 is fully random (122 random bits), making it the safest choice for most use cases. v5 hashes a namespace UUID together with a name string using SHA-1, always producing the same UUID for the same inputs — useful for deterministic ID generation.
Are the generated UUIDs truly unique?
v4 UUIDs have 122 bits of randomness. The probability of a collision between two randomly generated v4 UUIDs is approximately 1 in 5.3 × 10^36 — effectively zero for any practical application. v1 uniqueness relies on clock precision and node identity; v5 uniqueness is guaranteed for different name inputs within the same namespace.
Should I store UUIDs with or without hyphens in my database?
Both are valid. PostgreSQL's native UUID type stores them without hyphens internally and accepts either format. MySQL and MariaDB users often store UUIDs as CHAR(36) with hyphens or CHAR(32) without to save 4 bytes per row. Whichever you choose, apply it consistently across your schema.
Does it generate v1 or v5 UUIDs?
No. The tool generates random version 4 UUIDs only. v1 (time-based) and v5 (namespace + SHA-1 name hash) need different inputs; libraries such as the uuid npm package or Python's uuid module provide them.
Can I use UUID as a primary key in PostgreSQL?
Yes. PostgreSQL has a native UUID data type that stores the 128-bit value in 16 bytes (more efficient than VARCHAR(36)). Use gen_random_uuid() for server-side generation or supply client-generated v4 UUIDs. Be aware that random v4 UUIDs cause index fragmentation on B-tree indexes at high insert rates — consider UUIDv7 (sequential) for write-heavy tables.
Is UUID v4 safe to use as a public-facing identifier in URLs?
Yes. v4 UUIDs are statistically unguessable with 122 bits of entropy, making them safe for URLs that should not be enumerable. They are used by services like Stripe, Twilio, and GitHub for resource IDs in public APIs precisely because they cannot be guessed or iterated.
What is the performance impact of UUID primary keys vs. auto-increment integers?
Auto-increment integers are more cache-friendly because sequential values fill B-tree index pages linearly. Random v4 UUIDs cause page splits and fragmentation over time. For most applications the difference is negligible; for tables with millions of rows and high write throughput, consider sequential UUID formats (v1 or UUIDv7) or use UUIDs only as alternate keys alongside an integer primary key.
How do I generate UUIDs in code without a browser tool?
In Node.js 14.17+, use crypto.randomUUID() from the built-in crypto module. In older Node or browsers, the 'uuid' npm package provides v1/v3/v4/v5 with the same RFC 4122 compliance. In Python, use the standard library uuid module: import uuid; str(uuid.uuid4()).

Explore the category

Glossary

UUID (Universally Unique Identifier)
A 128-bit label used to identify information in computer systems. Standardized by RFC 4122, it is represented as 32 hexadecimal digits in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.
RFC 4122
The IETF standard defining the UUID format and generation algorithms for versions 1 through 5. It specifies bit layout, variant field, and version field positions within the 128-bit structure.
GUID (Globally Unique Identifier)
Microsoft's term for UUID, used throughout the Windows API, COM, and .NET ecosystems. GUIDs are structurally identical to RFC 4122 UUIDs.
Namespace UUID
A fixed UUID used as a seed for v3 and v5 generation. The namespace scopes the name, so the same name in different namespaces produces different output UUIDs.
Entropy
A measure of randomness in a generated value. UUID v4 has 122 bits of entropy (6 bits are fixed for version/variant), making each UUID statistically unique without central coordination.
Web Crypto API
A browser-native JavaScript API (window.crypto) that provides cryptographically secure random number generation via crypto.getRandomValues(), used to generate UUID v4 in client-side tools.
A LITTLE HELP. A LOT DONE.
Good tools.
Great flow.

Your shortcut to the everyday. Create, convert, calculate,
and get back to what you love.

✓ Free to use✓ No sign-up✓ 500+ possibilities