REST API Reference
Generate UUIDs, ULIDs, NanoIDs, GUIDs, and passwords programmatically. No API key, no sign-up. Supports JSON, text, CSV, and XML output.
https://uuid.codexneo.com/api/v1/handler.php
Overview
The UUID Codexneo API is a free, open REST API. No authentication, no API keys, no sign-up required.
All generation is performed server-side using PHP's random_bytes() CSPRNG.
Quick Reference
| Endpoint | slug= | Key Params | Example |
|---|---|---|---|
| UUID Generator | uuid | v=1|4|6|7, n=1-100 | ?slug=uuid&v=7&n=5 |
| GUID Generator | guid | n=1-100 | ?slug=guid&n=3 |
| ULID Generator | ulid | n=1-100 | ?slug=ulid&n=10 |
| NanoID Generator | nanoid | size=1-128, n=1-100 | ?slug=nanoid&size=21&n=5 |
| Password Generator | password | len=4-128, upper, lower, numbers, symbols, n=1-20 | ?slug=password&len=32 |
UUID Generator
slug=uuid
Generate RFC 4122 (v1, v4) and RFC 9562 (v6, v7) compliant UUIDs. Version 7 is recommended for database primary keys — it embeds a 48-bit Unix millisecond timestamp making it monotonically sortable.
| Parameter | Type | Default | Description |
|---|---|---|---|
| slug | string | required | Must be "uuid" |
| v | integer | 4 | UUID version: 1 (timestamp), 4 (random), 6 (reordered time), 7 (Unix epoch) |
| n | integer | 1 | Number of UUIDs to generate. Max 100. |
| format | string | json | Response format: json, text, csv, xml |
curl "https://uuid.codexneo.com/api/v1/handler.php?slug=uuid&v=4"curl "https://uuid.codexneo.com/api/v1/handler.php?slug=uuid&v=7&n=5"{
"status": "success",
"type": "uuid",
"version": 7,
"count": 5,
"data": [
"018f4b2c-7f3a-7d91-b4e2-9c1f3a8d2e05",
"018f4b2c-7f3b-7a12-8c3d-1e2f4a5b6c7d",
"018f4b2c-7f3c-7b23-9d4e-2f3a5b6c7d8e",
"018f4b2c-7f3d-7c34-ae5f-3a4b5c6d7e8f",
"018f4b2c-7f3e-7d45-bf60-4b5c6d7e8f90"
]
}GUID Generator
slug=guid
Generate Microsoft-format GUIDs — structurally identical to UUID v4 but returned uppercase and wrapped in curly braces, as expected by .NET, C#, and SQL Server.
| Parameter | Type | Default | Description |
|---|---|---|---|
| slug | string | required | Must be "guid" |
| n | integer | 1 | Number of GUIDs to generate. Max 100. |
| format | string | json | Response format: json, text, csv, xml |
curl "https://uuid.codexneo.com/api/v1/handler.php?slug=guid&n=3"{
"status": "success",
"type": "guid",
"count": 3,
"data": [
"{550E8400-E29B-41D4-A716-446655440000}",
"{A987FBC9-4BED-3078-CF07-9141BA07C9F3}",
"{B6F5A3C2-1D8E-4F9A-B2C3-D4E5F6A7B8C9}"
]
}ULID Generator
slug=ulid
Generate Universally Unique Lexicographically Sortable Identifiers. 128-bit, Crockford Base32 encoded, 26 characters, URL-safe, and monotonically sortable within the same millisecond.
| Parameter | Type | Default | Description |
|---|---|---|---|
| slug | string | required | Must be "ulid" |
| n | integer | 1 | Number of ULIDs to generate. Max 100. |
| format | string | json | Response format: json, text, csv, xml |
curl "https://uuid.codexneo.com/api/v1/handler.php?slug=ulid&n=10&format=text"{
"status": "success",
"type": "ulid",
"count": 3,
"data": [
"01HV8XKZP4QRST2MNBVCXZWQER",
"01HV8XKZP5ABCDE3FGHIJKLMNO",
"01HV8XKZP6PQRSTU7VWXYZ0123"
]
}NanoID Generator
slug=nanoid
Generate compact, URL-safe unique IDs using the NanoID algorithm. Default 21 characters with alphabet A-Za-z0-9_- gives ~126 bits of entropy — comparable to UUID v4.
| Parameter | Type | Default | Description |
|---|---|---|---|
| slug | string | required | Must be "nanoid" |
| size | integer | 21 | Length of each NanoID. Range: 1–128. |
| n | integer | 1 | Number of NanoIDs to generate. Max 100. |
| format | string | json | Response format: json, text, csv, xml |
curl "https://uuid.codexneo.com/api/v1/handler.php?slug=nanoid&size=16&n=5"{
"status": "success",
"type": "nanoid",
"size": 16,
"count": 5,
"data": [
"V1StGXR8_Z5jdHi6",
"Uakgb_J5m9g-0JDMb",
"7hy-YGZkB3d9weYBX",
"mhRLDqluVm-Xc3g_K",
"9CV1L-LtNN67bVYpJ"
]
}Password Generator
slug=password
Generate cryptographically secure random passwords using PHP's random_bytes(). Guarantees at least one character from each selected character set.
| Parameter | Type | Default | Description |
|---|---|---|---|
| slug | string | required | Must be "password" |
| len | integer | 24 | Password length. Range: 4–128. |
| upper | boolean | true | Include uppercase letters A-Z. |
| lower | boolean | true | Include lowercase letters a-z. |
| numbers | boolean | true | Include digits 0-9. |
| symbols | boolean | true | Include symbols !@#$%^&*()_+-=... |
| n | integer | 1 | Number of passwords to generate. Max 20. |
| format | string | json | Response format: json, text, csv, xml |
curl "https://uuid.codexneo.com/api/v1/handler.php?slug=password&len=32&symbols=false"curl "https://uuid.codexneo.com/api/v1/handler.php?slug=password&len=48&symbols=false&n=3"{
"status": "success",
"type": "password",
"length": 32,
"count": 1,
"data": "mK9xR2vL8nQ4wP7jY1tF6hD3bN5cA0eZ"
}Output Formats
Append &format= to any request to change the response format. Default is json.
json
application/json
Structured JSON with status, type, count, and data fields. Best for application integration.
text
text/plain
Raw identifiers separated by newlines. Best for shell scripts and piping.
csv
text/csv
CSV with header row "id". Best for spreadsheets and data pipelines.
xml
application/xml
XML with
curl "https://uuid.codexneo.com/api/v1/handler.php?slug=uuid&v=4&n=5&format=text" > uuids.txtcurl "https://uuid.codexneo.com/api/v1/handler.php?slug=ulid&n=100&format=csv" -o ulids.csvError Handling
All errors return a JSON object with an error key and an appropriate HTTP status code.
| HTTP Status | Cause | Example Response |
|---|---|---|
| 400 | Missing or invalid slug parameter | {"error":"Missing required parameter: slug"} |
| 400 | Invalid UUID version (not 1,4,6,7) | {"error":"Invalid UUID version. Use v=1, v=4, v=6, or v=7."} |
| 404 | Unknown slug value | {"error":"Unknown slug: 'foo'","valid_slugs":[...]} |
Code Examples
Copy-ready integration snippets for the most common languages and use cases.
const res = await fetch("https://uuid.codexneo.com/api/v1/handler.php?slug=uuid&v=7&n=1");
const json = await res.json();
console.log(json.data); // "018f4b2c-7f3a-7d91-b4e2-9c1f3a8d2e05"import requests
r = requests.get("https://uuid.codexneo.com/api/v1/handler.php", params={"slug": "uuid", "v": "7", "n": "5"})
uuids = r.json()["data"]
print(uuids) # ['018f4b2c-...', ...]$url = "https://uuid.codexneo.com/api/v1/handler.php?slug=uuid&v=7&n=1";
$json = json_decode(file_get_contents($url), true);
$uuid = $json["data"];
echo $uuid;const https = require("https");
https.get("https://uuid.codexneo.com/api/v1/handler.php?slug=ulid&n=3", res => {
let data = "";
res.on("data", chunk => data += chunk);
res.on("end", () => console.log(JSON.parse(data).data));
});package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
resp, _ := http.Get("https://uuid.codexneo.com/api/v1/handler.php?slug=uuid&v=7&n=1")
defer resp.Body.Close()
var result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Println(result["data"])
}# Generate a UUID v7 and use it as a filename
UUID=$(curl -s "https://uuid.codexneo.com/api/v1/handler.php?slug=uuid&v=7&format=text")
echo "Created: $UUID"
touch "/tmp/$UUID.json"Live Playground
Build and fire real API requests directly from this page. All requests hit the live endpoint.