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

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

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

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

### Example

```ts
import {
  assertEqual,
  createIdFromString,
  idBytesToId,
  idToIdBytes,
} from "@evolu/common";

const value = createIdFromString("todo");

assertEqual(idBytesToId(idToIdBytes(value)), value);
```