Files
bun.sh/docs/guides/util/base64.md
Colin McDonnell 112030481f More guides and fixing links (#3960)
* More guides

* WIP

* Updates

* Fix
2023-08-03 16:31:05 -07:00

572 B

name
name
Encode and decode base64 strings

Bun implements the Web-standard atob and btoa functions for encoding and decoding base64 strings.

const data = "hello world";
const encoded = btoa(data); // => "aGVsbG8gd29ybGQ="
const decoded = atob(encoded); // => "hello world"

See Docs > Web APIs for a complete breakdown of the Web APIs implemented in Bun.