logo
GeekFormat

UUID Generator

Format options

Count

1 item(s)

Free online UUID/GUID/ULID/NanoID generator supporting 5 unique ID formats, bulk generation up to 100, customizable formatting, and UUID validation. Ready to use instantly—perfect for database primary keys and test data creation.

Related

Use Cases

  • Generate UUID v4 as table record primary keys during database design to avoid data volume leakage from auto-increment IDs
  • Use ULID as sortable global request/trace IDs in distributed systems or microservice architectures
  • Bulk generate UUIDs as test data and mock order/user IDs during API development and integration testing
  • Use NanoID instead of UUID in frontend short links or share URLs—shorter, cleaner, no URL encoding needed
  • Use UUID v5 to generate deterministic IDs from fixed namespaces, ensuring same input always produces same output
  • Use the validation feature to identify ID type and version when encountering unknown-format IDs in debug logs or third-party documentation

Features

  • Five ID types in one tool: UUID v1 (timestamp), v4 (random), v5 (namespace), ULID (sortable), and NanoID (URL-safe)—one tool covers all tech stack needs
  • UUID validation & recognition: Switch to the Validate tab, paste any ID to identify its UUID version or detect ULID/NanoID format—fast troubleshooting during debugging
  • Bulk generate up to 100: Generate any quantity from 1 to 100 IDs at once—no more manually copying one by one for test data
  • Flexible formatting: Toggle uppercase and hyphens for UUIDs to match database, URL, and config file format requirements
  • Export & local history: One-click copy all, export TXT/JSON files, generation history saved locally for instant recovery—bulk operations more efficient
  • Client-side secure random: Uses browser crypto API for cryptographically secure random numbers, IDs never leave your device, works offline

How to Use

  1. Select the desired ID type from the cards above: UUID v4 (recommended), v1, v5, ULID, or NanoID
  2. If choosing UUID v5, enter a namespace string; other IDs can directly set format options
  3. Toggle uppercase and hyphen options as needed, set bulk generation count (1-100) via quick buttons or slider
  4. Click the generate button to view results—copy individually, copy all at once, or export as TXT/JSON
  5. To validate an existing ID, switch to the "Validate" tab and paste the ID string to get type and version info

FAQ

What's the difference between UUID and GUID?

UUID (Universally Unique Identifier) and GUID (Globally Unique Identifier) are essentially the same thing with different names: UUID is the formal IETF standard name (RFC 4122), while GUID is Microsoft's preferred term in the Windows ecosystem. Both share the identical 128-bit format like `550e8400-e29b-41d4-a716-446655440000`. Standard UUIDs generated by this tool work interchangeably in any scenario requiring GUIDs.

How to choose between UUID v1, v4, and v5?

UUID v1 is based on timestamp and MAC address—time-ordered and traceable, but may leak MAC address information. UUID v4 is completely random, the most commonly used and secure choice, suitable for most primary key and identifier scenarios. UUID v5 is a SHA-1 hash-based namespaced version—same namespace + same name always produces the same UUID, ideal for deterministic output scenarios. For general development, UUID v4 is the default choice.

What advantages do ULID and NanoID have over UUID v4?

ULID (26 chars) is shorter than UUID (36 chars with hyphens) and lexicographically sortable by creation time, making it ideal for database indexes and log tracing. NanoID (21 chars default) is even shorter and faster, using URL-safe characters so no escaping is needed in URLs and cookies—it's about 30% smaller than UUID. All three have negligible collision probability, but ULID's sortability shines in distributed systems, while NanoID is friendlier for frontend/URL scenarios.

Can I generate multiple UUIDs at once?

Yes. This tool supports bulk generation from 1 to 100 IDs. Set the count via quick buttons or the slider, then generate with one click—perfect for test data creation, bulk imports, and preparing unique IDs for scripts. After generation, you can copy all results at once or export as TXT or JSON files.

Bulk generation guide

Can I validate whether a string is a valid UUID?

Yes. Switch to the "Validate" tab and paste any string—the tool automatically identifies and validates: standard UUIDs (v1/v3/v4/v5) will report their specific version number, and it also recognizes ULID (26-char Crockford Base32) and NanoID (21-char URL-safe) formats, making it very convenient for quickly troubleshooting ID format issues during development and debugging.

Is generating UUIDs online safe? Will my IDs leak to a server?

Completely safe. All ID generation and validation runs locally in your browser via JavaScript, using crypto.getRandomValues() for cryptographically secure random numbers. No generated IDs are sent to any server, and no generation history is stored in the cloud. It works even when offline, making it suitable for enterprise intranets and sensitive projects.

Can I remove hyphens or convert UUIDs to uppercase?

Yes. For UUID v1/v4/v5, the tool provides two toggles: "Uppercase" switches the output case, and "Hyphens" lets you remove the dashes (useful for URLs, config files, or databases that require hyphen-free format). ULID and NanoID have no hyphens by default and also support case switching.

Why use an online tool instead of the command line to generate UUIDs?

Command-line tools (like Linux's uuidgen, Python's uuid module) require a development environment. An online tool works instantly in your browser with no installation needed. Additionally, this tool integrates UUID version recognition, bulk export, and local history features—more convenient when working across devices (e.g., generating IDs for non-technical colleagues) or when you need IDs on the fly.

What is a UUID?

UUID (Universally Unique Identifier) is a 128-bit identifier standardized by the Open Software Foundation (OSF), defined in RFC 4122. Its purpose is to allow distributed systems to uniquely identify information without a central authority for ID assignment.

A standard UUID looks like `550e8400-e29b-41d4-a716-446655440000`, composed of 32 hexadecimal digits split into 5 groups (8-4-4-4-12) by hyphens. Theoretically, the collision probability of UUID v4 is about 1/10^36—if you generated 1 billion UUIDs per second for about 800 years, the probability of a single collision would be approximately 50%, which is negligible in practice.

UUIDs are widely used for database primary keys, distributed trace IDs, request IDs, log trace IDs, unique file naming, test data IDs, and session identifiers. Nearly all mainstream programming languages include built-in UUID generation libraries.

术语表

UUID
Universally Unique Identifier, 128-bit length, RFC 4122 standard, common versions include v1 (timestamp+MAC), v4 (random), v5 (SHA-1 hash).
GUID
Globally Unique Identifier, Microsoft's term for UUID—the two are identical in format and purpose.
ULID
Universally Unique Lexicographically Sortable Identifier, 26 characters using Crockford Base32 encoding, first 48 bits are timestamp—sortable by creation time.
NanoID
A lightweight unique ID generator, 21 URL-safe characters by default (A-Za-z0-9_-), shorter and faster than UUID, ideal for frontend and URL scenarios.
UUID v1
Timestamp and MAC address-based UUID version, time-sortable but may leak MAC address and generation time—less secure than v4.
UUID v4
Completely random number-based UUID version, most widely used, negligible collision probability, the default choice in development.
UUID v5
SHA-1 hash-based namespaced UUID version—same namespace + same name input produces identical UUID output, suitable for deterministic scenarios.
Collision Probability
The probability that two randomly generated IDs are identical. UUID v4's collision probability is about 1 in 17 billion trillion, negligible in practical engineering.
Crockford Base32
A Base32 encoding designed by Douglas Crockford that uses uppercase letters and digits excluding I/L/O/U to avoid ambiguous characters—used by ULID.

UUID / ULID / NanoID Comparison

FeatureUUID v4ULIDNanoID
Length36 chars (with hyphens) / 32 chars (no hyphens)26 chars21 chars (default)
Character SetHexadecimal (0-9a-f)Crockford Base32 (32 chars)URL-safe (64 chars)
SortabilityUnordered (random)Time-orderedUnordered (random)
URL-safeNeeds escaping (hyphens + alphanumeric)Mostly safe (uppercase + digits)Fully URL-safe
Generation SpeedFastFast~60% faster than UUID
Collision Probability1/10^361/10^361/10^34 (at 21 chars)
Typical Use CasesDatabase primary keys, general IDsDistributed systems, log tracingShort URLs, frontend IDs, cookies

UUID Generation Methods by Language

LanguageCode
JavaScriptcrypto.randomUUID() // Modern browsers / Node.js 19+
Pythonimport uuid; uuid.uuid4()
JavaUUID.randomUUID()
Gogithub.com/google/uuid; uuid.New()
Bash/Linuxuuidgen or cat /proc/sys/kernel/random/uuid

Code Examples

Generate UUID v4 in JavaScript

javascript

Modern browsers and Node.js 14.17+ have the Web Crypto API built in, allowing direct UUID v4 generation without third-party libraries.

// Modern browsers / Node.js 19+
const id = crypto.randomUUID();
console.log(id); // "550e8400-e29b-41d4-a716-446655440000"

// Node.js 14.17 - 18.x
const crypto = require('crypto');
const id = crypto.randomUUID();

Bulk Generate UUIDs in Python

python

Use Python's standard library uuid module to bulk generate multiple UUID v4s, ideal for test data preparation.

import uuid

# Generate single UUID
uid = uuid.uuid4()
print(uid)

# Bulk generate 10 UUIDs
for _ in range(10):
    print(uuid.uuid4())

# Generate uppercase UUID without hyphens
print(uuid.uuid4().hex.upper())

Generate UUID from Shell Command Line

bash

Quickly generate UUIDs in Linux/macOS terminal, suitable for use in shell scripts.

# Linux
uuidgen

# macOS
uuidgen | tr 'A-Z' 'a-z'

# Direct read from system random file (most raw method)
cat /proc/sys/kernel/random/uuid

Authoritative References