Base64URL RFC 7515 Encoder and Decoder Tool

100% Client-Side Engine Instant Output

URL-Safe Base64 (Base64URL RFC 7515) Encoder & Decoder

Encode and decode URL-safe Base64 strings (RFC 7515 with - and _ chars without padding =) commonly used in JWT tokens and web tokens.

Web Token Encoding: Base64URL Standards

The Base64URL RFC 7515 Encoder and Decoder converts arbitrary text, binary blobs, and token signatures into web-safe format compliant with RFC 7515 and RFC 4648. Crucial for OAuth 2.0 implementations, JWT debugging, and API endpoint integrations.

Core Mathematical Relationships

Understand alphabet transformation and zero-padding elimination:

  • Character Mapping: $+ \mapsto -$ and $/ \mapsto \_$ for pure URL parameter compatibility.
  • Padding Omission: All trailing $=$ characters are stripped during RFC 7515 encoding.
  • Bit Packing Expansion: Encodes 3 8-bit bytes (24 bits) into 4 6-bit symbols with an expansion ratio of $4/3$.

How to Use the Calculator

  1. Paste raw text, hex, or standard Base64 string into the input area.
  2. Select conversion direction between Encode to Base64URL or Decode from Base64URL.
  3. Click Process Encoding to inspect immediate real-time URL-safe output and copy to clipboard.

Frequently Asked Questions

Base64URL replaces plus (+) with hyphen (-) and forward slash (/) with underscore (_), and omits equals (=) padding so output is completely safe in URL parameters and HTTP headers.

RFC 7515 defines JSON Web Signature (JWS), establishing the strict unpadded Base64URL encoding used universally across JSON Web Tokens (JWT).

Yes, plus signs can be interpreted as spaces by web servers, and forward slashes break URL path hierarchies unless percent-encoded.

The decoder calculates length modulo 4 and appends appropriate trailing equal signs (=) before passing bytes to standard base64 engines.


Fast review — stays on this site

Chat with us on Messenger