rembrembdocs

Skip to main content

Bun home pagelight logodark logo

[Runtime

](../../../index.md)[Package Manager

](../../../pm/cli/install/index.md)[Bundler

](../../../bundler/index.md)[Test Runner

](../../../test/index.md)[Guides

](../../index.md)[Reference

](https://bun.com/reference)[Blog

](https://bun.com/blog)[Feedback

](../../../feedback/index.md)

Bun implements the Web-standard TextDecoder class for converting from binary data types like Uint8Array and strings.

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

See Docs > API > Binary Data for complete documentation on manipulating binary data with Bun.

Was this page helpful?

Suggest editsRaise issue

[

Convert a Blob to a ReadableStream

Previous

](../blob-to-stream/index.md)[

Convert a Uint8Array to an ArrayBuffer

Next

](../typedarray-to-arraybuffer/index.md)