Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

base64-url

Package Overview
Dependencies
Maintainers
1
Versions
15
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

base64-url

Base64 encode, decode, escape and unescape for URL applications

  • 2.3.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Maintainers
1
Created

What is base64-url?

The base64-url npm package provides utilities for encoding and decoding data in base64 format, specifically tailored for URL-safe operations. It ensures that the encoded data is safe to use in URLs by replacing characters that are not URL-safe.

What are base64-url's main functionalities?

Encode to Base64 URL

This feature allows you to encode a string into a URL-safe base64 format. The encoded string can be safely used in URLs without any issues.

const base64url = require('base64-url');
const encoded = base64url.encode('Hello World!');
console.log(encoded); // Outputs: 'SGVsbG8gV29ybGQh'

Decode from Base64 URL

This feature allows you to decode a URL-safe base64 encoded string back to its original form.

const base64url = require('base64-url');
const decoded = base64url.decode('SGVsbG8gV29ybGQh');
console.log(decoded); // Outputs: 'Hello World!'

Escape Base64

This feature escapes a base64 encoded string to make it URL-safe by replacing characters like '+' and '/' with '-' and '_'.

const base64url = require('base64-url');
const escaped = base64url.escape('SGVsbG8gV29ybGQh');
console.log(escaped); // Outputs: 'SGVsbG8gV29ybGQh'

Unescape Base64

This feature unescapes a URL-safe base64 encoded string back to its original base64 format.

const base64url = require('base64-url');
const unescaped = base64url.unescape('SGVsbG8gV29ybGQh');
console.log(unescaped); // Outputs: 'SGVsbG8gV29ybGQh'

Other packages similar to base64-url

Keywords

FAQs

Package last updated on 31 Dec 2019

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc