Languages
[Edit]
EN

JavaScript - base64 with Unicode support

9 points
Created by:
Remy-Lebe
832

In this short article, we would like to show how to encode text to base64 with Unicode support and back (decode base64) in JavaScript.

Base64 with unicode support in JavaScript.
Base64 with unicode support in JavaScript.

Quick solution (safe approach):

 

Web browser methods based approach

Edit

Note: escape and unescape methods are marked as not recommended to use so read about them here and here.

 

See also

Edit
  1. JavaScript - strings default encoding

References

Edit
  1. btoa - MDN docs
  2. base64.js - NPM Page

Alternative titles

  1. JavaScript - base64 encode / decode example
  2. JavaScript - base 64 with Unicode support
  3. JavaScript - base 64 encode / decode example
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