TL;DR
No API Key Required
What it does: Generates UUIDs (universally unique identifiers) on demand. Choose v1 (time-based), v4 (random), or v5 (SHA-1 hash). Bulk generation up to 100 at once.
Why use it: Perfect for database primary keys, session IDs, transaction IDs, or any scenario requiring unique identifiers without writing UUID generation code.
Quick start: curl "https://www.uuidtools.com/api/generate/v4" → ["5a717e88-c74d-4a4f-8c53-8865e9b4e67e"]
Overview
UUIDTools provides a simple, no-authentication REST API for generating universally unique identifiers (UUIDs) following RFC 4122. A UUID is a 128-bit label that is guaranteed to be unique across space and time, making it ideal for distributed systems, database primary keys, session management, and API resource identifiers. The API supports versions 1, 4, and 5, plus a timestamp-first variant. No API key, signup, or rate limiting makes it one of the most accessible UUID generation services available globally.
Live Example
Generate a random v4 UUID instantly:
Request
GET https://www.uuidtools.com/api/generate/v4
Response
["5a717e88-c74d-4a4f-8c53-8865e9b4e67e"]
Field Explanations
UUIDs are 128-bit identifiers formatted as 32 hexadecimal digits in a 8-4-4-4-12 pattern:
- UUID Format
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx— 36 characters including hyphens. Example:5a717e88-c74d-4a4f-8c53-8865e9b4e67e- Version 1 (Time-based)
- Combines the current timestamp, clock sequence, and a node ID (usually the MAC address). Produces sortable, chronologically ordered UUIDs. Useful when insert order matters in databases.
- Version 4 (Random)
- Uses pseudo-random numbers for all bits except the version and variant markers. The most common UUID version, ideal for general-purpose unique identifiers, session tokens, and primary keys.
- Version 5 (SHA-1 Hash)
- Deterministic: the same namespace + name always produces the same UUID. Based on SHA-1 hashing. Ideal for generating reproducible identifiers from URLs, DNS names, or object IDs.
- Variant & Version Bits
- The 13th character indicates the UUID version (1, 4, or 5). The 17th character indicates the variant (typically
8,9,a, orbfor RFC 4122). This allows parsers to identify UUID type at a glance.
Code Examples
JavaScript Example
// Generate a single v4 UUID
fetch('https://www.uuidtools.com/api/generate/v4')
.then(r => r.json())
.then(([uuid]) => console.log(uuid));
// Generate 10 UUIDs at once
fetch('https://www.uuidtools.com/api/generate/v4/count/10')
.then(r => r.json())
.then(uuids => console.log(uuids));
// Generate a v5 UUID from a DNS namespace
fetch('https://www.uuidtools.com/api/generate/v5/namespace/ns:dns/name/example.com')
.then(r => r.json())
.then(([uuid]) => console.log(uuid));
Python Example
import requests
# Single v4 UUID
resp = requests.get('https://www.uuidtools.com/api/generate/v4')
uuid = resp.json()[0]
print(f"UUID: {uuid}")
# Bulk v4 UUIDs
resp = requests.get('https://www.uuidtools.com/api/generate/v4/count/50')
uuids = resp.json()
print(f"Got {len(uuids)} UUIDs")
# v5 UUID from URL namespace
resp = requests.get(
'https://www.uuidtools.com/api/generate/v5/namespace/ns:url/name/https://example.com'
)
print(resp.json()[0])
cURL Example
# Single random UUID (v4)
curl "https://www.uuidtools.com/api/generate/v4"
# 10 time-based UUIDs (v1)
curl "https://www.uuidtools.com/api/generate/v1/count/10"
# v5 UUID from DNS namespace + name
curl "https://www.uuidtools.com/api/generate/v5/namespace/ns:dns/name/example.com"
# Timestamp-first format
curl "https://www.uuidtools.com/api/generate/timestamp-first"
Frequently Asked Questions
- What's the difference between UUID v1, v4, and v5?
- v1 is time-based (includes timestamp + MAC address), produces chronologically sortable IDs. v4 is purely random and most common for general use. v5 is deterministic — same namespace + name always yields the same UUID using SHA-1 hashing.
- Which UUID version should I use for database primary keys?
- v4 (random) is the safest default for most databases. v1 can improve B-tree insert performance since IDs are sequential, but exposes the server's MAC address. v5 is useful when you need deterministic IDs across systems.
- Can I generate bulk UUIDs?
- Yes. Add
/count/Nto any endpoint, where N is 1-100. Example:/api/generate/v4/count/50returns 50 UUIDs in a JSON array. Useful for seeding databases or batch operations. - How are UUIDs useful for session management?
- v4 UUIDs make excellent session tokens and API keys because their 122 bits of randomness make collisions virtually impossible. They are unforgeable in practice and require no central coordination.
- Is there a rate limit or do I need an API key?
- No API key is required and there are no documented rate limits. UUIDTools has generated over 1.1 billion UUIDs for developers worldwide. The API is free to use for both personal and commercial projects.
- What is the timestamp-first endpoint for?
- The
/timestamp-firstendpoint generates UUIDs where the timestamp portion comes before the random portion, making them sortable by creation time while still maintaining uniqueness — useful for time-ordered database indexes.
API Details
- Base URL
https://www.uuidtools.com/api/generate- Method
- GET
- Authentication
- None (no API key required)
- Response Format
- JSON array of UUID strings
- Category
- Development
- Endpoints
/v1,/v4,/v5/namespace/{ns}/name/{name},/timestamp-first- Bulk Generation
- Add
/count/{N}(max 100) - Documentation
- uuidtools.com/docs