Skip to main content
Deno 2 is finally here 🎉️
Learn more
Go to Latest
The Standard Library has been moved to JSR. See the blog post for details.
function encodeBase64Url
import { encodeBase64Url } from "https://deno.land/std@0.220.1/encoding/base64url.ts";

Convert data into a base64url-encoded string.

Examples

Example 1

import { encodeBase64Url } from "https://deno.land/std@0.220.1/encoding/base64url.ts";

encodeBase64Url(new TextEncoder().encode("foobar")); // "Zm9vYmFy"

Parameters

data: ArrayBuffer | Uint8Array | string

Returns

string