📖 Guide Developer Tools

UUID and ULID Generator: Unique Identifiers for Every Use Case

Advertisement
⚡
UUID / ULID Generator

Generate UUID v1, v4, or ULID — one at a time or in bulk, with one-click copy.

Use this tool →

What is a UUID?

A UUID (Universally Unique Identifier, also called GUID — Globally Unique Identifier) is a 128-bit label used to uniquely identify objects in computer systems. The standard representation is a 32-character hexadecimal string divided by hyphens into five groups: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx. UUIDs are designed to be globally unique without requiring a central authority to assign them — two computers generating UUIDs independently should never produce the same value.

UUID v4 — random

UUID v4 uses 122 random bits (6 bits are used to mark the version and variant). The probability of generating two identical UUID v4s is astronomically low — approximately 1 in 5.3×10^36 for any single pair. For practical purposes, UUID v4s are unique forever. They are the most widely used format because they are simple, require no coordination or state, and reveal nothing about when or where they were generated. Use UUID v4 for database primary keys, session tokens, file names, and any identifier where neither time ordering nor traceability is needed.

UUID v1 — time-based

UUID v1 encodes the current timestamp (in 100-nanosecond intervals since October 15, 1582) and a MAC address (or random bytes if the MAC is unavailable). The first 8 characters of a UUID v1 change every 100 nanoseconds of wall clock time. UUID v1s are roughly time-sortable — earlier UUIDs sort before later ones — but the sort order is not immediately obvious because the time component is split across the fields in a non-sequential way. The timestamp embedded in UUID v1 can reveal when the ID was created, which may be a privacy concern.

ULID — sortable

ULID (Universally Unique Lexicographically Sortable Identifier) addresses the main limitation of UUID v4 — non-sortability. A ULID encodes a millisecond-precision timestamp in the first 10 characters using Crockford's Base32 alphabet, followed by 16 random characters. ULIDs sort chronologically by creation time without any external index. They are also more compact than UUIDs (26 characters vs 36), and use only uppercase letters and digits — no hyphens. Use ULIDs when your database benefits from sequential key insertion (B-tree index efficiency) or when you need time-sortable records.

NanoID — compact

NanoID generates compact, URL-safe random identifiers. At 21 characters with a URL-safe alphabet of 64 characters, NanoID has approximately 126 bits of randomness — comparable to UUID v4 but in a more compact form. It is popular in modern JavaScript frameworks as a lightweight alternative to UUID. Use NanoID for short IDs in URLs, API keys, and document IDs in NoSQL databases where compactness matters.

Bulk generation

The generator supports bulk generation of 1, 5, 10, 25, 50, or 100 IDs at once. Each row has an individual Copy button for picking specific IDs, and a "Copy all" button copies every generated ID to the clipboard as a newline-separated list — ready to paste into a database seed script, a test fixture, or a spreadsheet.

Advertisement
🔧
Use the tool
UUID / ULID Generator
💡
Pro Tips →
UUID / ULID Generator
❓
Frequently Asked Questions
Common questions about UUID / ULID Generator

📦 Recommended Resources

Handpicked books and tools — links may earn a small commission at no cost to you.