---
title: Convert a Uint8Array to a string
description: "Decode a `Uint8Array` of UTF-8 bytes into a string with the Web-standard `TextDecoder`."
sidebarTitle: "Uint8Array to string"
mode: center
---

Bun implements the Web-standard [`TextDecoder`](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder) class for converting binary data types like `Uint8Array` to strings.

```ts
const arr = new Uint8Array([104, 101, 108, 108, 111]);
const decoder = new TextDecoder();
const str = decoder.decode(arr);
// => "hello"
```

---

See [Binary Data](/runtime/binary-data#conversion).
