PublicSoftTools

UUID / GUID Generator Online

Generate RFC 4122-compliant UUID v4 (random) or UUID v1 (timestamp) identifiers instantly. Bulk-generate up to 100 at once and copy in one click. No signup, runs entirely in your browser.

Click Generate UUID to create one or more unique identifiers.

How the UUID Generator Works

  1. 1Choose a UUID version — v4 for fully random identifiers or v1 for timestamp-ordered identifiers.
  2. 2Set the count (1–100) to generate multiple UUIDs in one click — useful for test fixtures and database seeds.
  3. 3Optionally enable uppercase output for systems that require A–F in capitals instead of lowercase.
  4. 4Click Generate and use the Copy All button to copy all UUIDs to your clipboard as newline-separated values.

UUID Format: Understanding the Structure

A UUID is always 36 characters long in the canonical format xxxxxxxx-xxxx-Mxxx-Nxxx-xxxxxxxxxxxx where M is the version digit (1 or 4) and N is the variant digit (8, 9, a, or b for RFC 4122). This gives 32 hex digits plus 4 hyphens. Version 4 UUIDs randomise every bit except M and N; version 1 UUIDs encode a 60-bit timestamp in the first three groups.

Tips for Using UUIDs in Development

Primary Keys in PostgreSQL

Use the uuid column type with a DEFAULT of gen_random_uuid() (PostgreSQL 13+) or this tool to pre-generate IDs. Consider uuid_generate_v1mc() for time-ordered keys.

JavaScript / Node.js

In modern browsers and Node 15+, crypto.randomUUID() generates a v4 UUID natively — no library needed. This tool uses the same API.

Avoid Sequential IDs in APIs

Exposing sequential integer IDs in URLs reveals record counts and enables enumeration attacks. UUID-based resource identifiers like /api/users/<uuid> prevent this.

Index Performance

Random UUIDs cause page splits in clustered B-tree indexes. If insert throughput matters, use UUID v1, ULIDs, or PostgreSQL's uuid_generate_v1mc() for time-ordered keys.

Storing in SQL

Use the native UUID type in PostgreSQL or MySQL 8+. Storing as CHAR(36) wastes 20 bytes per row; storing as binary BINARY(16) is more compact if UUID type is unavailable.

Testing and Fixtures

Bulk-generate UUIDs for test data seeds, mock API responses, or Postman environment variables. The newline-separated output pastes directly into SQL INSERT statements or JSON arrays.

Frequently Asked Questions

What is a UUID and what is it used for?

A UUID (Universally Unique Identifier), also called a GUID (Globally Unique Identifier), is a 128-bit number formatted as 32 hexadecimal digits in the pattern xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. UUIDs are used as primary keys in databases, to identify API resources, track sessions, name files uniquely, and anywhere a collision-resistant unique ID is needed across distributed systems.

What is the difference between UUID v1 and UUID v4?

UUID v1 is timestamp-based: it encodes the current date/time plus a random clock sequence and a node identifier (traditionally the MAC address). Two v1 UUIDs generated at different times are therefore ordered chronologically, which can be useful for database indexing. UUID v4 is completely random — each of the 122 significant bits is independently random, making it ideal for cases where the generation time must not be inferred from the ID.

Are these UUIDs truly unique? Can two be the same?

UUID v4 uses 122 random bits, giving 2¹²² ≈ 5.3 × 10³⁶ possible values. The probability of generating a duplicate in 1 billion UUIDs is roughly 6 × 10⁻¹³ — effectively zero for any practical application. UUID v1 adds a timestamp component, further reducing collision risk. For production systems generating millions of IDs you should still use a database-enforced UNIQUE constraint, but random collisions are not a realistic concern.

Is my data private? Are the UUIDs stored anywhere?

No data leaves your browser. The generation runs entirely in client-side JavaScript using the browser's built-in crypto.randomUUID() API for v4 and a timestamp algorithm for v1. No UUID you generate is transmitted to any server, logged, or stored. You can verify this by opening your browser's Network tab while generating.

What is the "bulk generate" feature for?

The count input lets you generate 1–100 UUIDs in a single click. This is useful for seeding databases, creating test fixtures, pre-generating IDs for batch imports, or populating lookup tables. The output is newline-separated so you can paste directly into a text file or script.

Should I use UUID v1 or v4 for my database primary key?

It depends on your database. UUID v4 is completely random, which causes index fragmentation in B-tree indexes (like PostgreSQL's btree or MySQL's InnoDB). UUID v1 — or better, a UUID v7 or ULID — preserves time-ordering, resulting in sequential inserts and far better index performance. For most web applications on modern databases, v4 is fine unless you're inserting millions of rows per day.

Can I use these UUIDs in my code?

Yes. These are standards-compliant RFC 4122 UUIDs. You can use them anywhere: as JavaScript string literals, Python strings, SQL VALUES clauses, JSON properties, or environment variable values. The uppercase option produces the same UUID with A–F in capitals, which some legacy systems require.