Categories
JavaScript Answers

How to display Node.js raw Buffer data as Hex string?

Spread the love

To display Node.js raw Buffer data as Hex string, we call the buffer toString method.

For instance, we write

const s = buff.toString("hex");

to call toString on the buff buffer to convert it to a hex string.

By John Au-Yeung

Web developer specializing in React, Vue, and front end development.

Leave a Reply

Your email address will not be published. Required fields are marked *