A fast, secure, and developer-friendly ID generation service built on Cloudflare Workers
Secure & Collision-resistant
Next-generation GUIDs that are secure, collision-resistant, and sortable. Perfect for distributed systems.
Tiny & URL-friendly
Tiny, secure, URL-friendly unique string ID generator. Compact and perfect for short identifiers.
Standard & Universal
Universally unique identifiers following RFC 4122. Industry standard for unique identification.
All generators use secure random number generation
Built on Cloudflare Workers for worldwide speed
Simple REST API endpoints ready to use
Built with trusted open-source libraries
Clean API design with comprehensive documentation
Choose the right ID format for your use case
COMPLETE ENDPOINT REFERENCE • PARAMETER OPTIONS • USAGE EXAMPLES
Generates a cryptographically secure, collision-resistant identifier that's sortable by creation time.
GET /cuid2
Response: ch72gsb320000udocl363eofy
(24 characters)
Creates a CUID2 and truncates it to your specified length. Useful for shorter identifiers while maintaining security.
GET /cuid2/{length}
Parameters: length
- Integer between 1 and 100
GET /cuid2/12
GET /cuid2/32
GET /cuid2/100
Sample responses: ch72gsb3200
(12 chars), ch72gsb320000udocl363eofy
(32 chars)
Configure CUID2 with custom length and fingerprint for distributed systems. All parameters are optional and fall back to defaults.
# With fingerprint only
GET /cuid2?fingerprint=my-app-v1
# With length and fingerprint
GET /cuid2/16?fingerprint=production-server-01
# POST with full configuration
POST /cuid2
{
"length": 32,
"fingerprint": "production-server-01"
}
# Fallback to default CUID2
GET /cuid2
POST /cuid2
{}
Parameters: length
(1-100, optional), fingerprint
(optional string for host identification). If no parameters are provided, generates a standard CUID2.
Note: CUID2 doesn't natively support custom lengths, so we generate a full CUID2 and truncate it to your requested length. This maintains the cryptographic properties while allowing flexibility in length.
Creates a compact, URL-friendly unique identifier using a cryptographically secure random generator.
GET /nanoid
Response: V1StGXR8_Z5jdHi6B-myT
(21 characters)
Generates a NanoID of your exact specified length. Perfect for custom identifier requirements.
GET /nanoid/{length}
Parameters: length
- Integer between 1 and 100
GET /nanoid/8
GET /nanoid/16
GET /nanoid/64
Sample responses: V1StGXR8
(8 chars), V1StGXR8_Z5jdHi6B
(16 chars)
Note: NanoID natively supports custom lengths and generates cryptographically secure IDs of any size. Each length maintains the same security properties.
Creates a random UUID v4 following RFC 4122 standard. This is the most commonly used UUID version.
GET /uuid
Response: 550e8400-e29b-41d4-a716-446655440000
(36 characters)
Request a specific UUID version. Currently supports v1, v4, and v5 (all return v4 for now).
GET /uuid/{version}
Parameters: version
- String: "v1", "v4", or "v5"
GET /uuid/v4
GET /uuid/v7
Sample responses: 550e8400-e29b-41d4-a716-446655440000
(v4), 018e0b8c-7c7c-7c7c-7c7c-7c7c7c7c7c7c
(v7)
Note: UUID v4 provides random UUIDs, while v7 provides time-ordered UUIDs that are perfect for databases and time-series data. Both versions are fully implemented and production-ready.
Generate default IDs of each type using simple HTTP requests.
curl https://generateid.dev/cuid2
curl https://generateid.dev/nanoid
curl https://generateid.dev/uuid
Response types: CUID2 (24 chars), NanoID (21 chars), UUID (36 chars)
Customize ID lengths and versions for specific use cases.
curl https://generateid.dev/nanoid/16
curl https://generateid.dev/cuid2/12
curl https://generateid.dev/uuid/v4
curl https://generateid.dev/uuid/v7
Customization: NanoID length, CUID2 truncation, UUID version specification (v4, v7)
Integrate ID generation directly into your JavaScript applications.
const cuid2 = await fetch('https://generateid.dev/cuid2/16').then(r => r.text());
const nanoid = await fetch('https://generateid.dev/nanoid/32').then(r => r.text());
const uuid = await fetch('https://generateid.dev/uuid/v4').then(r => r.text());
const uuidv7 = await fetch('https://generateid.dev/uuid/v7').then(r => r.text());
Usage: Perfect for frontend apps, Node.js services, and browser-based tools
Generate IDs from Python scripts and applications.
import requests
cuid2 = requests.get('https://generateid.dev/cuid2/16').text
nanoid = requests.get('https://generateid.dev/nanoid/32').text
uuid = requests.get('https://generateid.dev/uuid/v4').text
uuidv7 = requests.get('https://generateid.dev/uuid/v7').text
Use in bash scripts and command-line automation.
#!/bin/bash
ID=$(curl -s https://generateid.dev/nanoid/16)
echo "Generated ID: $ID"
When requesting a length outside the allowed range (1-100 characters).
GET /nanoid/999
Response: Error: Length must be between 1 and 100
Solution: Use a length between 1 and 100 characters
When requesting an unsupported UUID version.
GET /uuid/v6
Response: Error: Version must be v1, v4, or v5
Solution: Use v4 or v7 (both are fully implemented)
When exceeding the rate limit of 100 requests per minute per IP address.
HTTP 429 Too Many Requests
{
"error": "Rate limit exceeded",
"requestId": "req_123456",
"retryAfter": 45
}
Solution: Wait for the specified retry time or implement exponential backoff
Rare server-side errors that may occur during ID generation.
HTTP 500 Internal Server Error
{
"error": "Internal server error",
"requestId": "req_123456"
}
Solution: Retry the request or contact support if persistent