Skip to content
uencoder

Base64URL NoPad

Base64URL NoPad is the Base64URL variant that strips all = padding characters, so the output length is not always a multiple of 4.

Purpose

It removes redundant characters where space matters and the decoder can infer the padding from the length (e.g., short tokens and URL parameters).

Mechanism

It uses the - and _ alphabet without = padding; when decoding, 0, 2, or 1 = characters are restored based on the string length modulo 4, and standard Base64URL decoding then proceeds.

Use cases

  • Compact JWT tokens
  • Short-link payloads
  • RESTful API parameters

Related tools

References