# Convert a DataView to a string

> Decode the bytes of a `DataView` into a string with the Web-standard `TextDecoder`.

If a [`DataView`](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DataView) contains ASCII-encoded text, use the [`TextDecoder`](https://developer.mozilla.org/en-US/docs/Web/API/TextDecoder) class to convert it to a string.

```ts
const dv: DataView = ...;
const decoder = new TextDecoder();
const str = decoder.decode(dv);
```

---

See [Binary Data](https://bun.aphrody.app/docs/runtime/binary-data#conversion).
