EN
TypeScript / Node.js - convert base64 to string
0
points
In this article, we would like to show you how to convert Base64 to string in TypeScript.
Practical example
In this example, we decode a string of data that has been encoded using Base64 encoding.
const encoded: string = 'c29tZSB0ZXh0Li4u';
const decoded: string = Buffer.from(encoded, 'base64').toString('utf8');
console.log('Decoded text: ' + decoded);
Output:
Decoded text: some text...