UUID/Nanoid Generator

UUID/Nanoid Generator API

Development

Generate unique identifiers instantly with various algorithms. Create UUIDs, CUIDs, ULIDs, and NanoIDs for secure, sortable, and scalable applications.

Authentication

All API requests require a valid API key passed in the Authorization header as a Bearer token.

Rate Limit

120 requests per minute

Endpoints

1 endpoint available

Overview

The UUID/Nanoid Generator API generates and validates unique identifiers using various algorithms.

Supported ID Types

  • UUID v1: Timestamp + MAC address based
  • UUID v3: MD5 hash of namespace + name
  • UUID v4: Random (most commonly used)
  • UUID v5: SHA-1 hash of namespace + name
  • UUID v6: Reordered v1 for sortability
  • UUID v7: Unix timestamp based, sortable
  • CUID: Collision-resistant for distributed systems
  • ULID: Lexicographically sortable
  • NanoID: Compact, URL-friendly

Validation Support

  • UUID (any version)
  • ULID
  • CUID

Endpoints

POST
https://opentools.ca/api/v1/tools/uuid-generator
Generate or validate unique identifiers

Request Body

Content-Type: application/json

ParameterTypeRequiredDescription
operation
string
Required
Operation: "generate" or "validate"
type
string
Required
ID type: "uuidv1", "uuidv3", "uuidv4", "uuidv5", "uuidv6", "uuidv7", "cuid", "ulid", "nanoid" (for generate), or "uuid", "ulid", "cuid" (for validate)
count
number
OptionalNumber of IDs to generate, 1-100. Must be 1 for the name-based types (uuidv3, uuidv5), which always return the same UUID for the same name and namespace.Default: 1
name
string
OptionalName to hash for uuidv3 and uuidv5. Ignored for other types.Default: OpenTools
namespace
string
OptionalNamespace UUID for uuidv3 and uuidv5. Ignored for other types.Default: 1b671a64-40d5-491e-99b0-da01ff1f3341
id
string
OptionalID to validate (required for "validate" operation)

Response Example

{
  "success": true,
  "operation": "generate",
  "type": "uuidv4",
  "count": 2,
  "ids": [
    "550e8400-e29b-41d4-a716-446655440000",
    "f47ac10b-58cc-4372-a567-0e02b2c3d479"
  ]
}

Error Codes

400
Bad Request - Invalid type or missing required parameters
401
Unauthorized - Invalid or missing API key
429
Too Many Requests - Rate limit exceeded
500
Internal Server Error

Code Examples

# Generate UUIDs
curl -X POST https://opentools.ca/api/v1/tools/uuid-generator \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operation": "generate",
    "type": "uuidv4",
    "count": 5
  }'

# Validate a UUID
curl -X POST https://opentools.ca/api/v1/tools/uuid-generator \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "operation": "validate",
    "type": "uuid",
    "id": "550e8400-e29b-41d4-a716-446655440000"
  }'

Ready to get started?

Create an API key to start using the UUID/Nanoid Generator API.

Rather use it in your browser? Open the UUID/Nanoid Generator