UUIDs, Nanoids, Hex Tokens & more

UUID & ID Generator API

Generate unique identifiers with a single GET request. UUIDs, nanoids, hex tokens, numeric IDs, timestamps — with optional prefixes and batch generation up to 100.

Supported Formats

uuid / v4

Standard UUID v4 — 36 character hex with dashes

nanoid

21-character URL-safe random ID (A-Za-z0-9_-)

nanoid-short

12-character compact nanoid for short URLs

hex

32-character random hex string

base64

22-character random base64url string

numeric

18-digit random numeric string

timestamp

Millisecond Unix timestamp as ID

Code Examples

cURL

# Single UUID
curl "https://api-snap.com/api/uuid" -H "Authorization: Bearer snp_your_key"

# 10 prefixed nanoids
curl "https://api-snap.com/api/uuid?format=nanoid&count=10&prefix=usr_" \
  -H "Authorization: Bearer snp_your_key"

JavaScript

const res = await fetch(
  "https://api-snap.com/api/uuid?format=nanoid&count=5&prefix=txn_",
  { headers: { Authorization: "Bearer snp_your_key" } }
);
const { ids } = await res.json();
// ["txn_V1StGXR8_Z5jdHi6B-myT", ...]

Python

import requests

r = requests.get(
    "https://api-snap.com/api/uuid",
    params={"format": "nanoid", "count": 5, "prefix": "order_"},
    headers={"Authorization": "Bearer snp_your_key"},
)
ids = r.json()["ids"]

Start Generating IDs

No crypto libraries needed. Just an API call.

Get Your Free API Key