# Convert to base64?

**URL:** <https://forums.losant.com/t/convert-to-base64/4484>\
**Category:** Help\
**Tags:** workflow\
**Created:** [April 22, 2022, 3:17pm UTC](https://forums.losant.com/t/convert-to-base64/4484 "2022-04-22T15:17:07Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jonathan\_Calderon](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@Jonathan\_Calderon](https://forums.losant.com/u/Jonathan_Calderon)\
**Post date:** [April 22, 2022, 3:17pm UTC](https://forums.losant.com/t/convert-to-base64/4484/1 "2022-04-22T15:17:07Z")

</div>

Hello Losant Team!

Do you know how convert data in base64? Maybe a node?

Thanks! 🙂

---

<div class="post-metadata">

**Author:** ![Erin\_Thompson](https://sea1.discourse-cdn.com/flex015/user_avatar/forums.losant.com/erin_thompson/32/501_2.png) [@Erin\_Thompson](https://forums.losant.com/u/Erin_Thompson)\
**Post date:** [April 22, 2022, 3:37pm UTC](https://forums.losant.com/t/convert-to-base64/4484/2 "2022-04-22T15:37:57Z")

</div>

Hi Jonathan,

There are a few ways to convert data to base64.

If you are using an Embedded workflow then we do have a [Base64 Encode Node](https://docs.losant.com/workflows/logic/base64-encode/) and [Base64 Decode Node](https://docs.losant.com/workflows/logic/base64-decode/).

However if you are using any other type of workflow, you can use a [format helper](https://docs.losant.com/workflows/accessing-payload-data/#format-helpers) like this {{ encodeBase64 data.str }}. Or you can also use the Function node, and transform your UTF8 string into a [buffer](https://nodejs.org/dist/latest-v16.x/docs/api/buffer.html) and then into Base64. I would recommend you use the format helper as the Function node will take longer to complete than using the format helpers on a specific node that allows templates.

Hope this helps,  
Erin

---

<div class="post-metadata">

**Author:** ![Jonathan\_Calderon](https://avatars.discourse-cdn.com/v4/letter/j/ecccb3/32.png) [@Jonathan\_Calderon](https://forums.losant.com/u/Jonathan_Calderon)\
**Post date:** [April 22, 2022, 3:39pm UTC](https://forums.losant.com/t/convert-to-base64/4484/3 "2022-04-22T15:39:37Z")

</div>

Thanks for the Reply Erin. 🙂
