A lightweight library for URL-safe Base64 encoding and decoding.
npm install visionary-base64url   
A lightweight base64url converter for Node.js, web browsers, and worker environments. Built on js-base64 for broad compatibility and automatic runtime detection.
``bash
npm install visionary-base64url
yarn add visionary-base64url
`
`ts
import { encodeBase64Url } from "visionary-base64url";
const encoded = encodeBase64Url("The quick brown fox jumps over the lazy dog.");
console.log(encoded);
// VGhlIHF1aWNrIGJyb3duIGZveCBqdW1wcyBvdmVyIHRoZSBsYXp5IGRvZy4
`
`ts
import { decodeBase64Url } from "visionary-base64url";
const decoded = decodeBase64Url("aHR0cHM6Ly93d3cuc3BhY2V4LmNvbS92ZWhpY2xlcy9zdGFyc2hpcA");
console.log(decoded);
// https://www.spacex.com/vehicles/starship
`
base64url is a web-safe variant of Base64 encoding. It replaces problematic characters (+, =, /) with URL and filename-friendly alternatives (_, -), as defined in RFC 4648.
Use base64url` for portable, URL-safe encoding of text or JSON data, making it ideal for environments where standard Base64 might break things. Safely drop it into contexts like:
- URL paths and query parameters — embed data directly in URLs
- Filesystem-friendly — safe for filenames and blob storage keys
- Shell scripts and CI pipelines — avoid quoting or escaping issues in command-line tools and automation workflows
- JWTs and web tokens — compliant with RFC 7515 (JWS compact serialization)