# JSON Object conversion of Base64 to HEX

**URL:** <https://forums.losant.com/t/json-object-conversion-of-base64-to-hex/1904>\
**Category:** Help\
**Tags:** mqtt\
**Created:** [June 19, 2019, 11:52pm UTC](https://forums.losant.com/t/json-object-conversion-of-base64-to-hex/1904 "2019-06-19T23:52:33Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jose\_Cruz](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/jose_cruz/32/1580_2.png) [@Jose\_Cruz](https://forums.losant.com/u/Jose_Cruz)\
**Post date:** [June 19, 2019, 11:52pm UTC](https://forums.losant.com/t/json-object-conversion-of-base64-to-hex/1904/1 "2019-06-19T23:52:33Z")

</div>

Greetings. I’m fairly new to Losant, not really a _developer_ but do have a sensor already MQTT-ing to a workflow, converting JSON sensor strings to objects and displaying values on a dashboard - so not bad for a developer wannabe ☀ . But I have one problem, I’ve looked on the forums already and haven’t quite found exactly the answer to my ❓ (if this topic has already been discussed/solved, by all means re-direct me to that one 🙂 )

All of my JSON **metadata** objects are ‘good’ for handling, But one is in the format of Base64. This would be my **payload\_raw** value. I need it in **HEX** Base16 1 byte words format for decoding. Before I begin all over the place I would like the community for guidance: do I make a Function, Mutate, Math, etc. The right starting point would be best.

Here’s an example of payload raw message : “payload\_raw”: “GAoBPg==”  
Need something like : “payload” or “payload\_hex”: “180A013E” (0-7 byte payload; in this case 4 byte payload : 18 0A 01 3E)

Again, any guidance, help in the right direction would be appreciated!

Thanks in advance! j 🔴

---

<div class="post-metadata">

**Author:** ![JuliaKempf](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/juliakempf/32/2446_2.png) [@JuliaKempf](https://forums.losant.com/u/JuliaKempf)\
**Post date:** [June 20, 2019, 2:26pm UTC](https://forums.losant.com/t/json-object-conversion-of-base64-to-hex/1904/2 "2019-06-20T14:26:59Z")

</div>

Hi @Jose_Cruz,

Welcome to the forums! It sounds like you’ve made a lot of progress, great work 🥳

I think you’ll find [format helpers](https://docs.losant.com/workflows/accessing-payload-data/#format-helpers) to be quite helpful for decoding from base64. There is also a good [forum post](https://forums.losant.com/t/solved-hex-to-32-bit-float/1339) here with a similar question on converting from hex.

Let me know if I can help any further, this is just a nudge in the right direction 😄

Thanks!  
Julia

---

<div class="post-metadata">

**Author:** ![Jose\_Cruz](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/jose_cruz/32/1580_2.png) [@Jose\_Cruz](https://forums.losant.com/u/Jose_Cruz)\
**Post date:** [June 20, 2019, 7:52pm UTC](https://forums.losant.com/t/json-object-conversion-of-base64-to-hex/1904/3 "2019-06-20T19:52:26Z")

</div>

@JuliaKempf **thank you** _!_

This is definitely a good _nudge_ in the right direction 😃 I’ll get on those links asap and will let you know if further assistance is needed.

j 🔴
