UUID Generation
The /uuid endpoint generates random UUID v4 values, or parses an existing UUID to extract its version and variant.
How it works?
The endpoint has two modes. When uuid is provided, it switches to parsing and count is ignored. Otherwise it generates count random UUID v4 values (a single one by default). A malformed UUID is not an error: it is returned with valid: false and null components.
curl -X GET \ "https://api.moxon.dev/v5/uuid"Send the request to see the response here.
uuidstringoptionalUUID to parse. When provided, nothing is generated and
countis ignoredcountnumberoptionalNumber of UUIDs to generate, an integer between 1 and 50. Default:
1
The variant is derived from the first character of the fourth group:
| Character | Variant |
|---|---|
0 – 7 | NCS |
8 – b | RFC 4122 |
c – d | Microsoft |
e – f | Future |
Single UUID (generated, or count of 1):
uuidstringThe generated UUID
versionnumberUUID version — always
4when generatedvariantstringAlways
RFC 4122when generated
Batch (count greater than 1):
uuidsstring[]Array of generated UUID v4 values
countnumberNumber of UUIDs returned
Parsing (uuid provided):
uuidstringThe original input UUID
versionnumber|nullUUID version,
nullif the input is not a valid UUIDvariantstring|nullUUID variant,
nullif the input is not a valid UUIDvalidbooleanWhether the input matches the UUID format
If parameters are missing or invalid, the API will return an error:
- 400
Please provide a valid UUID (?uuid={uuid})Theuuidparameter is not a single string value - 400
Count must be a numberThecountvalue is not a number - 400
Count must be between 1 and 50Thecountvalue is not an integer between 1 and 50
Last updated on September 7, 2026