# Function to convert b64 to hex?

**URL:** https://discourse.nodered.org/t/function-to-convert-b64-to-hex/51035
**Category:** General
**Created:** [14 September 2021 23:09 UTC](https://discourse.nodered.org/t/function-to-convert-b64-to-hex/51035 "2021-09-14T23:09:11Z")
**Posts on this page:** 1
**Showing post:** 2

<div class="post-metadata">

### Author: ![Steve-Mcl](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/steve-mcl/32/4826_2.png) [@Steve-Mcl](https://discourse.nodered.org/u/Steve-Mcl)
#### Post date: [15 September 2021 06:54 UTC](https://discourse.nodered.org/t/function-to-convert-b64-to-hex/51035/2 "2021-09-15T06:54:46Z")

</div>

### Base64 to Buffer (array of numbers)

`Buffer.from('AQIDBAU=', "base64")`  
→ \<Buffer 01 02 03 04 05\>

### Base64 to Hexadecimal String...

`Buffer.from('AQIDBAU=', "base64").toString("hex")`  
→ '0102030405'

---

_[View the full topic](https://discourse.nodered.org/t/function-to-convert-b64-to-hex/51035)._
