A `Buffer` is Node's fixed-length array of raw bytes, essential once you touch files, sockets, or blockchain data like transaction hashes, signatures and ABI-encoded calldata (all of which are really just bytes).
js
const buf = Buffer.from("hello", "utf8");
console.log(buf); // <Buffer 68 65 6c 6c 6f>
console.log(buf.toString("hex")); // "68656c6c6f"
console.log(buf.length); // 5 bytes
const hash = Buffer.from("deadbeef", "hex");
console.log(hash.toString("base64"));Buffers implement the same API as JavaScript's standard `Uint8Array`, so code written for browsers using `Uint8Array` (common in web3 libraries) interoperates with Node's `Buffer` in most cases.