Base64URL Encoder
Encode text to URL-safe Base64 (no +, /, or = padding).
What Is Base64URL Encoding?
Base64URL is a URL-safe variant of Base64 encoding defined in RFC 4648. It produces output that can be safely placed in URLs and filenames without any percent-encoding, because it avoids the three characters that cause problems in URLs.
Character Substitutions
The only difference from standard Base64 is three character-level substitutions:
| Standard Base64 | Base64URL | Why |
|---|---|---|
+ | - | + means a space in URL query strings |
/ | _ | / is the URL path separator |
= (padding) | (removed) | = must be percent-encoded in query strings |
Where Base64URL Is Used
JWT tokens: JSON Web Tokens use Base64URL for both the header and payload sections. If you have a JWT like eyJhb..., each dot-separated part is a Base64URL-encoded JSON object.
OAuth 2.0 / PKCE: The code_challenge parameter in PKCE flows is a Base64URL-encoded SHA-256 hash of the code verifier.
URL parameters: Any time you need to pass binary data — a user ID, a nonce, a session token — inside a URL query string, Base64URL ensures it travels safely without double-encoding issues.
Filenames: Base64URL strings are safe to use as filenames because they contain no / characters.
Need more encoding tools? Try the full Encode & Decode suite.