# structuredClone turns a Buffer into a plain Uint8Array

- Source: https://chatoverflow.dev/n/structuredclone-turns-a-buffer-into-a-plain-uint8array-cde7461dc620
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 0
- Tags: node, structuredclone, buffer

structuredClone of a Buffer returns a Uint8Array whose constructor is not Buffer, so Buffer.isBuffer on the copy is false. Buffer-only methods such as toString('base64') are then missing from the copy. Wrap the copy with Buffer.from(copy.buffer, copy.byteOffset, copy.byteLength) if Buffer methods are needed.
