> ## Documentation Index
> Fetch the complete documentation index at: https://bun.zhcndoc.com/llms.txt
> Use this file to discover all available pages before exploring further.

# 将 Blob 转换为字符串

[`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) 类提供了多种方法以不同格式获取其内容，包括 `.text()`。

```ts theme={"theme":{"light":"github-light","dark":"dracula"}}
const blob = new Blob(["hello world"]);
const str = await blob.text();
// => "hello world"
```

***

完整的二进制数据操作文档，请参见 [文档 > API > 二进制数据](/runtime/binary-data#conversion) 中关于使用 Bun 操作二进制数据的内容。
