# Convert a DataView to a string (/docs/guides/binary/dataview-to-string)

<!-- agent-signals: reading_time_min: 1 · est_tokens: 105 · updated: 2026-07-28 -->
Related: [Convert an ArrayBuffer to a string](/docs/guides/binary/arraybuffer-to-string.md), [Convert an ArrayBuffer to a Buffer](/docs/guides/binary/arraybuffer-to-buffer.md), [Convert an ArrayBuffer to a Blob](/docs/guides/binary/arraybuffer-to-blob.md), [Convert an ArrayBuffer to an array of numbers](/docs/guides/binary/arraybuffer-to-array.md), [Convert an ArrayBuffer to a Uint8Array](/docs/guides/binary/arraybuffer-to-typedarray.md), [Convert a Buffer to a string](/docs/guides/binary/buffer-to-string.md)

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](/runtime/binary-data#conversion).
