Languages
[Edit]
EN

Node.js - Base64 encode and decode

0 points
Created by:
Majid-Hajibaba
972

In this article, we would like to show you how to encode and decode Base64 in JavaScript under Node.js.

Quick solution:

 

1. Encode

Edit

In this example, we create a Base64-encoded ASCII string using Buffer.from() with toString() method.

Output:

2. Decode

Edit

In this example, we decode a string of data that has been encoded using Base64 encoding.

Output:

Alternative titles

  1. Node.js - Base 64 encode and decode
1
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