Base64URL Encode/Decode
URL-safe Base64 encoding used in JWTs and other applications
Input
Output
What is Base64URL?
Base64URL is a URL and filename-safe variant of Base64 encoding. It replaces characters that have special meaning in URLs:
| Standard Base64 | Base64URL | Reason |
|---|---|---|
| + | - | + is space in URLs |
| / | _ | / is path separator |
| = (padding) | (omitted) | = has special meaning in query strings |
Common Uses
Base64URL is used in:
- JSON Web Tokens (JWT) - header and payload encoding
- JSON Web Keys (JWK) - key material encoding
- OAuth 2.0 PKCE - code_challenge encoding
- Data URLs that need to be URL-safe
- Filenames derived from encoded data