# `Commanded.UUID`
[🔗](https://github.com/commanded/commanded/blob/v1.4.12/lib/commanded/uuid.ex#L5)

Generate and format random, version 4 UUIDs.

# `hex`

```elixir
@type hex() :: &lt;&lt;_::288&gt;&gt;
```

A hex-encoded UUID string.

# `raw`

```elixir
@type raw() :: &lt;&lt;_::128&gt;&gt;
```

A raw binary representation of a UUID.

# `binary_to_string!`

```elixir
@spec binary_to_string!(raw()) :: hex()
```

# `string_to_binary!`

```elixir
@spec string_to_binary!(hex()) :: raw()
```

Converts a string representing a UUID into a raw binary.

# `uuid4`

```elixir
@spec uuid4() :: hex()
```

Generates a random, version 4 UUID.

---

*Consult [api-reference.md](api-reference.md) for complete listing*
