Skip to content

encodeBase64Url

Module Export

[byte] |> text

Encodes a binary iterator into a URL-safe Base64 text

The resulting encoding replaces ’+’ and ’/’ with ’-’ and ’_’ to make it safe to use in URLs.

Examples

import { encodeBase64Url } from 'base64'
import { asBytes } from 'text'
from 'Hello World' asBytes encodeBase64Url