# Convert an ArrayBuffer to a Buffer (/docs/guides/binary/arraybuffer-to-buffer)

<!-- agent-signals: reading_time_min: 1 · est_tokens: 160 · updated: 2026-07-28 -->
Related: [Convert an ArrayBuffer to a string](/docs/guides/binary/arraybuffer-to-string.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), [Convert a Buffer to an ArrayBuffer](/docs/guides/binary/buffer-to-arraybuffer.md)

The Node.js [`Buffer`](https://nodejs.org/api/buffer.html) API predates the introduction of `ArrayBuffer` into the JavaScript language. Bun implements both.

Use the static `Buffer.from()` method to create a `Buffer` from an `ArrayBuffer`.

```ts
const arrBuffer = new ArrayBuffer(64);
const nodeBuffer = Buffer.from(arrBuffer);
```

***

To create a `Buffer` that only views a portion of the underlying buffer, pass the offset and length to `Buffer.from()`.

```ts
const arrBuffer = new ArrayBuffer(64);
const nodeBuffer = Buffer.from(arrBuffer, 0, 16); // view first 16 bytes
```

***

See [Binary Data](/runtime/binary-data#conversion).
