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

```ts
function bytesToHex(bytes: Uint8Array): string;
```

Defined in: node_modules/.bun/@noble+ciphers@2.1.1/node_modules/@noble/ciphers/utils.d.ts:40

Convert byte array to hex string. Uses built-in function, when available.

## Example

```ts
bytesToHex(Uint8Array.from([0xca, 0xfe, 0x01, 0x23])); // 'cafe0123'
```