Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@frsource/base64

FRSOURCE114.4kMIT1.0.160TypeScript support: included

base64 encoder/decoder with UTF-8 support 📔

base64, utf-8, encoder, decoder, webtoolkit, webtoolkit.base64

readme

NPM version badge NPM total downloads badge semantic-relase badge license MIT badge

@frsource/base64

This javascript code is used to encode / decode data using base64 (this encoding is designed to make binary data survive transport through transport layers that are not 8-bit clean). Script is fully compatible with UTF-8 encoding. You can use base64 encoded data as simple encryption mechanism.

If you plan using UTF-8 encoding in your project don’t forget to set the page encoding to UTF-8 (Content-Type meta tag).

Installation

npm i @frsource/base64

Usage

// Importing:
// typescript / ES6
import { encode, decode } from '@frsource/base64';

// legacy javscript
const { encode, decode } = require('@frsource/base64');

const encoded = encode('我喜欢解码lubię dekodować');
console.log(encoded); // output: 5oiR5Zac5qyi6Kej56CBbHViacSZIGRla29kb3dhxIc=
const decoded = decode(encoded);
console.log(encoded); // output: 我喜欢解码lubię dekodować

References

Based on webtoolkit.info implementation. Original source code available at: http://www.webtoolkit.info/javascript_base64.html

License

MIT

Copyright (c) 2022-present, Jakub FRS Freisler, FRSOURCE

FRSOURCE logo

changelog

1.0.160 (2025-05-26)

1.0.159 (2025-05-26)

1.0.158 (2025-05-26)

1.0.157 (2025-05-26)

1.0.156 (2025-05-24)

1.0.155 (2025-05-23)

1.0.154 (2025-05-19)

1.0.153 (2025-05-19)

1.0.152 (2025-05-12)

1.0.151 (2025-05-05)

1.0.150 (2025-05-05)

1.0.149 (2025-04-28)

1.0.148 (2025-04-28)

1.0.147 (2025-04-21)

1.0.146 (2025-04-21)

1.0.145 (2025-04-21)

1.0.144 (2025-04-15)

1.0.143 (2025-04-14)

1.0.142 (2025-04-12)

1.0.141 (2025-04-07)

1.0.140 (2025-04-07)

1.0.139 (2025-04-07)

1.0.138 (2025-04-02)

1.0.137 (2025-04-02)

1.0.136 (2025-03-31)

1.0.135 (2025-03-31)

1.0.134 (2025-03-24)

1.0.133 (2025-03-24)

1.0.132 (2025-03-17)

1.0.131 (2025-03-10)

1.0.130 (2025-03-10)

1.0.129 (2025-03-03)

1.0.128 (2025-03-03)

1.0.127 (2025-02-24)

1.0.126 (2025-02-24)

1.0.125 (2025-02-17)

1.0.124 (2025-02-17)

1.0.123 (2025-02-15)

1.0.122 (2025-02-15)

1.0.121 (2025-02-04)

1.0.120 (2025-02-03)

1.0.119 (2025-01-27)

1.0.118 (2025-01-27)

1.0.117 (2025-01-27)

1.0.116 (2025-01-27)

1.0.115 (2025-01-23)

1.0.114 (2025-01-20)

1.0.113 (2025-01-20)

1.0.112 (2025-01-14)

1.0.111 (2025-01-13)

1.0.110 (2025-01-06)

1.0.109 (2025-01-05)

1.0.108 (2024-12-30)

1.0.107 (2024-12-29)

1.0.106 (2024-12-27)

1.0.105 (2024-12-23)

1.0.104 (2024-12-17)

1.0.103 (2024-12-09)

1.0.102 (2024-12-02)

1.0.101 (2024-12-02)

1.0.100 (2024-11-20)

1.0.99 (2024-11-20)

1.0.98 (2024-11-18)

1.0.97 (2024-11-04)

1.0.96 (2024-11-04)

1.0.95 (2024-11-04)

1.0.94 (2024-10-29)

1.0.93 (2024-10-28)

1.0.92 (2024-10-21)

1.0.91 (2024-10-21)

1.0.90 (2024-10-15)

1.0.89 (2024-10-14)

1.0.88 (2024-10-08)

1.0.87 (2024-10-08)

1.0.86 (2024-10-08)

1.0.85 (2024-10-07)

1.0.84 (2024-10-07)

1.0.83 (2024-09-30)

1.0.82 (2024-09-30)

1.0.81 (2024-09-23)

1.0.80 (2024-09-23)

1.0.79 (2024-09-16)

1.0.78 (2024-09-16)

Bug Fixes

  • update utf8 encoding and decoding implementation to make it compatible with 4 bytes unicode (#89) (7534308) (contribution by @backrunner 🎉 )

1.0.77 (2024-09-16)

1.0.76 (2024-09-09)

1.0.75 (2024-09-04)

1.0.74 (2024-08-26)

1.0.73 (2024-08-19)

1.0.72 (2024-08-12)

1.0.71 (2024-08-07)

1.0.70 (2024-07-29)

1.0.69 (2024-07-29)

1.0.68 (2024-07-29)

1.0.67 (2024-07-15)

1.0.66 (2024-07-15)

1.0.65 (2024-07-11)

1.0.64 (2024-07-08)

1.0.63 (2024-07-02)

1.0.62 (2024-07-01)

1.0.61 (2024-06-17)

1.0.60 (2024-06-17)

1.0.59 (2024-06-10)

1.0.58 (2024-06-03)

1.0.57 (2024-06-03)

1.0.56 (2024-06-02)

1.0.55 (2024-06-02)

1.0.54 (2024-05-27)

1.0.53 (2024-05-20)

1.0.52 (2024-05-20)

1.0.51 (2024-05-20)