For Developers
HTTP API
Generate UUIDs straight from your terminal or app — no key, no sign-up. Responses are
JSON by default; send Accept: text/plain
for newline-delimited output that's easy to pipe.
Endpoints
| Method & path | Description |
|---|---|
| GET /api/uuid | A UUID (v4 by default), or use the query parameters below. |
| GET /api/uuid/v4 | Alias for ?version=4. |
| GET /api/uuid/v7 | Alias for ?version=7. |
Query parameters
| Parameter | Values | Default |
|---|---|---|
| version | 1, 4, 7, nil | 4 |
| count | 1–1000 | 1 |
| format | lowercase, uppercase, braces, hyphenless | lowercase |
Invalid parameters return 400 with a JSON
{"error": "…"} explaining the allowed values.
Examples
# One v4 UUID
curl https://getuuid.sh/api/uuid
# → {"version":"4","format":"lowercase","uuid":"…"}
# Five v7 UUIDs
curl 'https://getuuid.sh/api/uuid?version=7&count=5'
# Aliases
curl https://getuuid.sh/api/uuid/v4
curl https://getuuid.sh/api/uuid/v7
# Plain text, 100 uppercase UUIDs
curl -H 'Accept: text/plain' 'https://getuuid.sh/api/uuid?count=100&format=uppercase'
Responses
Single (count=1)
{
"version": "4",
"format": "lowercase",
"uuid": "…"
}
Multiple (count > 1)
{
"version": "7",
"format": "lowercase",
"count": 5,
"uuids": ["…", "…"]
}
Generate a UUID in your language
Each snippet produces a random (version 4) UUID locally — no network needed. Don't want a dependency? Call the API above instead.
uuidgen
# Linux box without uuidgen:
cat /proc/sys/kernel/random/uuid
import uuid
print(uuid.uuid4())
// Browsers + Node 19+
const id = crypto.randomUUID();
const id: string = crypto.randomUUID();
Guid.NewGuid().ToString();
// .NET 9+ — time-ordered v7:
Guid.CreateVersion7().ToString();
import "github.com/google/uuid"
id := uuid.New().String()
import java.util.UUID;
String id = UUID.randomUUID().toString();
import java.util.UUID
val id = UUID.randomUUID().toString()
require "securerandom"
id = SecureRandom.uuid
// uuid = { version = "1", features = ["v4"] }
use uuid::Uuid;
let id = Uuid::new_v4();
// composer require ramsey/uuid
use Ramsey\Uuid\Uuid;
echo Uuid::uuid4()->toString();
use Data::UUID;
print Data::UUID->new->create_str;