# Convert to Base64 and Convert From Base64

**URL:** https://community.linx.software/community/t/convert-to-base64-and-convert-from-base64/700
**Category:** How To
**Created:** [August 26, 2024, 12:31pm UTC](https://community.linx.software/community/t/convert-to-base64-and-convert-from-base64/700 "2024-08-26T12:31:46Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![Shantoie](https://community.linx.software/community/user_avatar/community.linx.software/shantoie/32/1376_2.png) [@Shantoie](https://community.linx.software/community/u/Shantoie)
#### Post date: [August 26, 2024, 12:31pm UTC](https://community.linx.software/community/t/convert-to-base64-and-convert-from-base64/700/1 "2024-08-26T12:31:46Z")

</div>

In Linx you can convert a string to and from Base64 by using an expression.

To convert to Base64 the string must first be converted to a list of bytes (List), then the list of bytes can be converted to Base64. In the expression editor it will look like this:  
`MyString.ToBytes().ToBase64()`

We must reverse this process to convert from Base64 back to a normal string. In the expression editor it will look like this:  
`MyString.ToBytesFromBase64().ToString("Default")`

The attached solution contains two functions that will assist with Base64 conversation. Copy them into your Linx Solution and use them.

[ConversionToBase64.zip](https://community.linx.software/community/uploads/short-url/lkEd1z47s26jKpa8iKkrVx5nuNu.zip) (2.6 KB)

The functions are as follows:

- ConvertToBase64: Will convert an input string to a Base64 string
- FromBase64ToString: Will decode a Base64 string
