Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno/ext/web/lib.deno_web.d.ts>btoa

A modern runtime for JavaScript and TypeScript.
Latest
function btoa
import { btoa } from "https://deno.land/x/deno@v2.0.4/ext/web/lib.deno_web.d.ts";

Creates a base-64 ASCII encoded string from the input string.

console.log(btoa("hello world"));  // outputs "aGVsbG8gd29ybGQ="

Parameters

s: string

Returns

string