# UUID generator

Generate UUIDs: random (v4), time-ordered (v7), name-based (v5) or the nil UUID.

- Endpoint: `POST https://setget.net/v1/tools/uuid` with JSON `{"input": {...}}`
- MCP: `run_tool` with `slug` = `uuid`
- Page: https://setget.net/tools/uuid

## Inputs

- `version` (optional, string, one of `v4`, `v7`, `v5`, `nil`, default `"v4"`): v4 is random, v7 is time-ordered and sorts by creation time, v5 is always the same for the same namespace and name, nil is all zeros.
- `count` (optional, integer, default `1`, range 1..100): How many to generate. v5 and nil always give one.
- `name` (optional, string): For v5: the name to turn into a UUID.
- `namespace` (optional, string, default `"dns"`): For v5: "dns", "url", "oid", "x500" or any UUID to use as the namespace.
- `uppercase` (optional, boolean, default `false`): Write the letters A-F in upper case.
- `hyphens` (optional, boolean, default `true`): Keep the hyphens. Turn off for 32 plain hex digits.

## Example 1: Three random UUIDs

```json
{"input":{"version":"v4","count":3}}
```

## Example 2: A name-based UUID is always the same

```json
{"input":{"version":"v5","namespace":"dns","name":"python.org"}}
```

Result:

```json
{"text":"886313e1-3b8a-5372-9b90-0c9aee199e5d","uuids":["886313e1-3b8a-5372-9b90-0c9aee199e5d"],"version":"v5"}
```

## Example 3: Time-ordered, compact

```json
{"input":{"version":"v7","count":2,"uppercase":true,"hyphens":false}}
```

**Which version should I use?** v4 for general use. v7 when the IDs are database keys, because they sort by creation time. v5 when the same input must always give the same ID.

**Can two random UUIDs collide?** In practice, no. A v4 UUID has 122 random bits, so a clash is far less likely than a hardware fault.

**Does a v7 UUID reveal anything?** Yes, its creation time to the millisecond. Use v4 if that should stay private.
