Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
sasmpu00
Frequent Visitor

How to convert text to base64 text

Hi, I am working with REST API as source, where I have to send token for authintication. 

But I have to send that as base 64 text. 

 

I want to convert string- zc4cqxzc2k522zfzpueslrn3e3dvaxgxntpcnujnboksj7yico3a  to base 64 which will come as 

OnpjNGNxeHpjMms1MjJ6ZnpwdWVzbHJuM2UzZHZheGd4bnRwY251am5ib2tzajd5aWNvM2E=

4 REPLIES 4
okayashik
New Member

Hello,

You will get the function for every programming language to encode or decode base64. 
Like Javascript base encode to decode tool: https://www.techinblood.com/base64-encoder-and-base64-decoder/

Thanks

armandobs14
New Member

Text.toBinary("text",BinaryEncoding.Base64)
Binary.FromText("1011", BinaryEncoding.Base64)

v-caliao-msft
Microsoft Employee
Microsoft Employee

@sasmpu00,

 

Please refer to the link below to Encode and Decode text in Base64.
http://www.url-encode-decode.com/base64-encode-decode/

 

Regards,

Charlie Liao

 

PlePlppppsadfjklasdl  gyt6v c

I am looking for M code which will convert it to base64 automatically. 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors