URL-Safe Base64 Encoder & Decoder

Encode and decode the URL-safe Base64 variant — using - and _ with no padding — perfect for JWTs, tokens and query strings. Need the standard variant? Use the main converter.

0 characters

Standard vs. URL-safe Base64

Both alphabets encode the same bytes — only three things change:

  • + becomes - (minus)
  • / becomes _ (underscore)
  • Trailing = padding is removed

These swaps keep the string intact when placed in a URL, cookie or filename, where +, / and = would otherwise need percent-encoding.

URL-safe Base64 FAQ

What is URL-safe Base64?+

URL-safe Base64 is a variant of Base64 that replaces the "+" and "/" characters with "-" and "_", and usually omits the "=" padding. This lets the encoded string be used safely in URLs, query strings, filenames and cookies without escaping.

When should I use URL-safe Base64?+

Use it whenever the encoded value travels inside a URL or HTTP header — for example JSON Web Tokens (JWTs), OAuth tokens, password-reset links and API identifiers all use URL-safe Base64.

What is the difference between standard and URL-safe Base64?+

They encode the same data; only two characters differ. Standard Base64 uses "+", "/" and "=" padding, while URL-safe Base64 uses "-", "_" and drops the padding so the string survives URL encoding unchanged.

Can I decode a URL-safe Base64 string here?+

Yes. Switch to Decode mode above and paste your URL-safe string — the tool restores the standard alphabet and padding automatically before decoding.