Bytes to Base64

Convert a byte array to a base64 encoded string for safe text transmission.

Code

Utilities
btoa(String.fromCharCode(...bytes));

Parameters

Byte array.

Browser·fetch() may be limited by CORS

More JavaScript Snippets