[API reference](https://evolu.dev/docs/api-reference) › [@evolu/common](https://evolu.dev/docs/api-reference/common) › [Type](https://evolu.dev/docs/api-reference/common/Type) › idToUuid

```ts
function idToUuid(value: string & Brand<"Id">): string & Brand<"Uuid">;
```

Defined in: [packages/common/src/Type.ts:10602](https://github.com/evoluhq/evolu/blob/bc4578a260dd15d5bbf94b83765ca05984d194cb/packages/common/src/Type.ts#L10602)

Converts an [Id](https://evolu.dev/docs/api-reference/common/Type/variables/Id) to the [Uuid](https://evolu.dev/docs/api-reference/common/Type/variables/Uuid) with the same 16 bytes.

The result is a Uuid of any version or variant, because Ids created by
[createId](https://evolu.dev/docs/api-reference/common/Type/functions/createId) are random 128-bit values. Ids created by
[createIdAsUuidv7](https://evolu.dev/docs/api-reference/common/Type/functions/createIdAsUuidv7) convert to version 7 UUIDs.

### Example

```ts
import {
  assertEqual,
  createIdAsUuidv7,
  createRandomBytes,
  createTime,
  idToUuid,
  uuidToId,
} from "@evolu/common";

const id = createIdAsUuidv7({
  randomBytes: createRandomBytes(),
  time: createTime(),
});
const uuid = idToUuid(id);

assertEqual(uuid[14], "7");
assertEqual(uuidToId(uuid), id);
```