# Bun Convert a Blob to a Uint8Array

> Convert a Blob to a Uint8Array

- Skill: `jarle/bun-convert-a-blob-to-a-uint8array` (Agent Skill)
- Install (CLI): `npx skillmds@latest add jarle/bun-convert-a-blob-to-a-uint8array`
- Raw SKILL.md: https://api.skillmd.com/api/skills/jarle/bun-convert-a-blob-to-a-uint8array/raw
- Safety review: pending (external: skill-scanner PASS, skillspector PASS)
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: Coding & Dev Tools
- Author: jarle (https://skillmd.com/u/jarle)
- Updated: 2026-09-21
- Page: https://skillmd.com/skills/jarle/bun-convert-a-blob-to-a-uint8array

---


# Convert a Blob to a Uint8Array

The [`Blob`](https://developer.mozilla.org/en-US/docs/Web/API/Blob) class provides a number of methods for consuming its contents in different formats. This snippets reads the contents to an `ArrayBuffer`, then creates a `Uint8Array` from the buffer.

```ts  theme={"theme":{"light":"github-light","dark":"dracula"}}
const blob = new Blob(["hello world"]);
const arr = new Uint8Array(await blob.arrayBuffer());
```

***

See [Docs > API > Binary Data](/runtime/binary-data#conversion) for complete documentation on manipulating binary data with Bun.

