[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) › idToIdBytes

```ts
function idToIdBytes(
  value: string & Brand<"Id">,
): Uint8Array<ArrayBufferLike> & Brand<"Length16"> & Brand<"IdBytes">;
```

Defined in: [packages/common/src/Type.ts:6175](https://github.com/evoluhq/evolu/blob/037c390af081e9944d616ff298a729515c5c5ab7/packages/common/src/Type.ts#L6175)

Converts an [Id](https://evolu.dev/docs/api-reference/common/Type/variables/Id) to [IdBytes](https://evolu.dev/docs/api-reference/common/Type/variables/IdBytes).

### Example

```ts

const bytes = idToIdBytes(createIdFromString("todo"));

assertEqual(bytes.length, 16);
```