Languages
[Edit]
EN

TypeScript / Node.js - convert base64 to string

0 points
Created by:
Bess
601

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...
Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.
Native Advertising
🚀
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂

Join