JSFiddle - React, Tailwind, and code Playground

by brigand

JavaScript

const bytes = new TextEncoder().encode("ÆØÅ");
const bin = Array.from(bytes, byte => String.fromCharCode(byte)).join('');
const b64 = btoa(bin);
console.log(b64)

// > Buffer.from('ÆØÅ').toString('base64')
// 'w4bDmMOF'