Skip to content

UUID Generator: What UUIDs Are and How to Generate Them

Developer ToolsMarch 8, 2026·3 min read

TL;DR

Learn what UUIDs are, how the different versions work, and when to use them. Generate random UUIDs instantly with a free online uuid generator.

Every modern app needs a way to identify things. Users, orders, sessions, uploaded files, API requests. At some point, every one of those gets an ID. And for millions of developers, that ID is a UUID.

UUIDs show up everywhere. You'll find them in database rows, URL paths, log files, and API responses. They look something like this: 550e8400-e29b-41d4-a716-446655440000. Thirty-six characters, five groups separated by hyphens. Not exactly memorable, but that's not the point. The point is that no other ID on the planet looks the same.

This guide explains what UUIDs are, how the versions differ, and when you'd pick one over a regular auto-incrementing ID. Need one right now? The Morphkit UUID Generator creates them instantly in your browser.

What Is a UUID?

UUID stands for Universally Unique Identifier. It's a 128-bit number, typically displayed as a 36-character string in the format xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. The standard comes from RFC 4122.

The key property: universally unique. You can generate one on your laptop in Amsterdam and another on a server in Tokyo, and they won't collide. No central authority needed. No database lookup required. Just generate and go.

Try Lorem Ipsum Generator Free

Generate placeholder text for your designs.

Open Tool

No signup required. Runs in your browser.

UUID Versions Explained

Version 1: Timestamp + MAC Address

UUID v1 combines a timestamp with the MAC address of the computer that generated it. It has a privacy issue: anyone who reads the UUID can extract your device's MAC address. Mostly fallen out of favor.

Version 4: Random

The one you'll see most often. Generated almost entirely from random numbers. 122 bits are random. No timestamp, no MAC address, no information leakage. This is what crypto.randomUUID() produces.

Version 5: Name-Based

Takes a namespace and a name, runs them through SHA-1 hashing to produce a deterministic UUID. Give it the same inputs, always get the same output.

Version 7: Timestamp-Ordered (Newest)

Defined in RFC 9562 (2024). Combines a Unix timestamp in milliseconds with random bits. The result is both unique and sortable by creation time. Better database performance than v4 for primary keys.

Where UUIDs Are Used

  • Database primary keys
  • API identifiers
  • Session tokens
  • File names to prevent collisions
  • Distributed systems
  • Message queues for deduplication

UUID vs Auto-Increment IDs

Auto-increment advantages: Smaller storage, human-readable, better index performance in some databases.

UUID advantages: Generate anywhere without database lookup, merge databases without conflicts, hide business information, work across microservices.

Generate UUIDs with Morphkit

The Morphkit UUID Generator lets you create UUIDs directly in your browser. Select the version, choose how many, click generate, copy results. Everything runs client-side.

How Unlikely Is a Collision?

A UUID v4 has 122 random bits: roughly 5.3 x 10^36 possible values. You'd need to generate about 2.7 billion UUIDs every second for 100 years before you'd have even a 50% chance of a single collision. For any real-world application, UUID collisions are not a practical concern.

When Not to Use UUIDs

If IDs need to be short and human-readable, like booking references or coupon codes. If you're using UUIDs as database primary keys and query performance matters, consider UUID v7's time-ordering over v4's full randomness.

Try the Morphkit UUID Generator to create single or bulk UUIDs instantly. Need to hash something? The Hash Generator runs the same way. And for credentials, the Password Generator builds strong random passwords on the same principle.

Share

Related Articles